AzerothCore 3.3.5a
OpenSource WoW Emulator
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:233
float Tolerance
Definition: MotionMaster.h:99
float RelativeAngle
Definition: MotionMaster.h:98

Member Function Documentation

◆ IsAngleOkay()

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

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().