NW4F G3d
Loading...
Searching...
No Matches
nw::g3d::math::Vec2 Class Reference

#include <g3d_Vector2.h>

Inherits nw::g3d::math::Vec2_t.

Public Member Functions

Vec2Set (float x, float y)
Vec2Set (const float *a)
Vec2Set (const Vec2 &v)
Vec2Zero ()
Vec2Neg (const Vec2 &v)
Vec2Rcp (const Vec2 &v)
Vec2Add (const Vec2 &lhs, const Vec2 &rhs)
Vec2Sub (const Vec2 &lhs, const Vec2 &rhs)
Vec2Mul (const Vec2 &lhs, const Vec2 &rhs)
Vec2Div (const Vec2 &lhs, const Vec2 &rhs)
Vec2Mul (const Vec2 &lhs, float rhs)
Vec2Div (const Vec2 &lhs, float rhs)
float Normalize (const Vec2 &v)

Static Public Member Functions

static Vec2 Make (float x, float y)
static Vec2Cast (float *a)
static const Vec2Cast (const float *a)
static float Length (const Vec2 &v)
static float LengthSq (const Vec2 &v)
static float Distance (const Vec2 &lhs, const Vec2 &rhs)
static float DistanceSq (const Vec2 &lhs, const Vec2 &rhs)
static float Dot (const Vec2 &lhs, const Vec2 &rhs)

Additional Inherited Members

Public Types inherited from nw::g3d::math::Vec2_t
enum  { DIM = 2 , DIM_PS = DIM / 2 }
Public Attributes inherited from nw::g3d::math::Vec2_t
union { 
   struct { 
      float   x 
      float   y 
   } 
   float   a [DIM
}; 

Member Function Documentation

◆ Make()

NW_G3D_MATH_INLINE Vec2 nw::g3d::math::Vec2::Make ( float x,
float y )
static

◆ Cast() [1/2]

NW_G3D_MATH_INLINE Vec2 * nw::g3d::math::Vec2::Cast ( float * a)
static

◆ Cast() [2/2]

NW_G3D_MATH_INLINE const Vec2 * nw::g3d::math::Vec2::Cast ( const float * a)
static

◆ Set() [1/3]

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Set ( float x,
float y )

◆ Set() [2/3]

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Set ( const float * a)

◆ Set() [3/3]

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Set ( const Vec2 & v)

◆ Zero()

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Zero ( )

◆ Neg()

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Neg ( const Vec2 & v)

◆ Rcp()

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Rcp ( const Vec2 & v)

◆ Add()

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Add ( const Vec2 & lhs,
const Vec2 & rhs )

◆ Sub()

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Sub ( const Vec2 & lhs,
const Vec2 & rhs )

◆ Mul() [1/2]

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Mul ( const Vec2 & lhs,
const Vec2 & rhs )

◆ Div() [1/2]

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Div ( const Vec2 & lhs,
const Vec2 & rhs )

◆ Mul() [2/2]

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Mul ( const Vec2 & lhs,
float rhs )

◆ Div() [2/2]

NW_G3D_MATH_INLINE Vec2 & nw::g3d::math::Vec2::Div ( const Vec2 & lhs,
float rhs )

◆ Length()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec2::Length ( const Vec2 & v)
static

◆ LengthSq()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec2::LengthSq ( const Vec2 & v)
static

◆ Distance()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec2::Distance ( const Vec2 & lhs,
const Vec2 & rhs )
static

◆ DistanceSq()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec2::DistanceSq ( const Vec2 & lhs,
const Vec2 & rhs )
static

◆ Dot()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec2::Dot ( const Vec2 & lhs,
const Vec2 & rhs )
static

◆ Normalize()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec2::Normalize ( const Vec2 & v)