mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Actor improvements p2
This commit is contained in:
parent
da28beeab4
commit
32fddb163f
37 changed files with 718 additions and 710 deletions
|
@ -120,7 +120,8 @@ public:
|
|||
float length( void ) const;
|
||||
float lengthfast( void ) const;
|
||||
float lengthSquared( void ) const;
|
||||
float lengthXY( bool squared = false ) const;
|
||||
float lengthXY() const;
|
||||
float lengthXYSquared() const;
|
||||
float normalize( void );
|
||||
void normalizefast( void );
|
||||
void EulerNormalize( void );
|
||||
|
@ -548,9 +549,25 @@ inline float Vector::lengthfast( void ) const
|
|||
//
|
||||
// Returns: float - length of the vector in the xy plane
|
||||
//----------------------------------------------------------------
|
||||
inline float Vector::lengthXY( bool squared ) const
|
||||
inline float Vector::lengthXY() const
|
||||
{
|
||||
return squared ? (x * x) + (y * y) : sqrt(( x * x ) + ( y * y ));
|
||||
return sqrt(( x * x ) + ( y * y ));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
// Name: lengthXYSquared
|
||||
// Class: Vector
|
||||
//
|
||||
// Description: Returns length of the vector squared (using only the x
|
||||
// and y components
|
||||
//
|
||||
// Parameters: None
|
||||
//
|
||||
// Returns: float - squared length of the vector in the xy plane
|
||||
//----------------------------------------------------------------
|
||||
inline float Vector::lengthXYSquared() const
|
||||
{
|
||||
return ( x * x ) + ( y * y );
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue