img



img

Check If an Angle is within Arc of another Angle


By: _ForgeUser7801501
Addon | img 319




Description

___________________________________________________________________________________________________________________________

A simple library to tell if an angle is within an arc of another angle.

A few notes with it, "Facing angle of unit" and "Angle between points" among others actually return a range of -180 through 180 by default, and this accounts for that. It adds 180 to whatever the input is. If you input your own angles that are not from Blizzard's system, remove 180 from what you have. Angles can only be -180 through 180, anything above or below will screw up.

Also, you must remove the function and two variables from the library file to use them. If in arc variable is a simple yes or no boolean. Returned angle is either the angle you are checking to see if it is in the arc of the other angle, and if it is not in the arc then it will return either the highest or lowest value depending on which is closer.

This is probably far from perfect, maybe even a little inefficient, but it works for exactly what l need it to, which is run every 16th of a second without much lag.

Bugs.. Are to be expected. l don't know if converting it from non-variables (Facing angle of unit) screwed anything up, as l may have done some things wrong, but l don't think l did.

This is NOT extensively tested. You've been warned.




About Project

Created: October 2nd 2023

Updated: October 2nd 2023

Project ID: 23457

License: All Rights Reserved

__________________________________________

Game Versions:

1.01.03

1.01.03

1.01.03

1.01.03

1.01.03

__________________________________________

Flavors:

WoW Retail

__________________________________________

Categories

Companions

Battle

__________________________________________

Main File

_ForgeUser7801501_Check If an Angle is within Arc of another Angle.zip
  • Release
  • October 2nd 2023

    __________________________________________

    Recent File

    _ForgeUser7801501_Check If an Angle is within Arc of another Angle.zip
  • Release
  • October 2nd 2023

    __________________________________________

    Members

    img
    _ForgeUser7801501
    Owner

    __________________________________________

    Report