AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ChaseAngle Struct Reference

#include "MotionMaster.h"

Public Member Functions

 ChaseAngle (float angle, float _tolerance=M_PI_4)
 
float UpperBound () const
 
float LowerBound () const
 
bool IsAngleOkay (float relativeAngle) const
 

Public Attributes

float RelativeAngle
 
float Tolerance
 

Detailed Description

Constructor & Destructor Documentation

◆ ChaseAngle()

ChaseAngle::ChaseAngle ( float  angle,
float  _tolerance = M_PI_4 
)
static float NormalizeOrientation(float o)
Definition: Position.h:232
float Tolerance
Definition: MotionMaster.h:101
float RelativeAngle
Definition: MotionMaster.h:100

Member Function Documentation

◆ IsAngleOkay()

bool ChaseAngle::IsAngleOkay ( float  relativeAngle) const
62{
63 float const diff = std::abs(relativeAngle - RelativeAngle);
64
65 return (std::min(diff, float(2 * M_PI) - diff) <= Tolerance);
66}

References RelativeAngle, and Tolerance.

◆ LowerBound()

float ChaseAngle::LowerBound ( ) const

◆ UpperBound()

float ChaseAngle::UpperBound ( ) const

Member Data Documentation

◆ RelativeAngle

float ChaseAngle::RelativeAngle

Referenced by IsAngleOkay(), LowerBound(), and UpperBound().

◆ Tolerance

float ChaseAngle::Tolerance

Referenced by IsAngleOkay(), LowerBound(), and UpperBound().