Simulant  21.06-50
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | Public Attributes | Friends | List of all members
smlt::Vec2 Struct Reference

Public Member Functions

 Vec2 (float x, float y)
Vec2 rotated_by (const Degrees &degrees) const
float length () const
float length_squared () const
void normalize ()
Vec2 normalized () const
void limit (float l)
Vec2 operator* (float rhs) const
Vec2operator*= (float rhs)
Vec2operator+= (const Vec2 &rhs)
Vec2operator-= (const Vec2 &rhs)
Vec2 operator+ (const Vec2 &rhs) const
Vec2operator/= (float rhs)
Vec2 operator/ (float rhs) const
Vec2 operator- () const
Vec2 operator- (const Vec2 &rhs) const
float dot (const Vec2 &rhs) const
Vec3 xyz (float z=0.0f) const
Vec4 xyzw (float z=0.0f, float w=1.0f) const
bool equals (const Vec2 &rhs) const

Public Attributes

float x
float y


std::ostream & operator<< (std::ostream &stream, const Vec2 &vec)
bool operator== (const Vec2 &lhs, const Vec2 &rhs)

The documentation for this struct was generated from the following files: