Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Vector2 Struct Reference

Public Member Functions

_FORCE_INLINE_ float & operator[] (int p_idx)
 
_FORCE_INLINE_ const float & operator[] (int p_idx) const
 
void normalize ()
 
Vector2 normalized () const
 
float length () const
 
float length_squared () const
 
float distance_to (const Vector2 &p_vector2) const
 
float distance_squared_to (const Vector2 &p_vector2) const
 
float angle_to (const Vector2 &p_vector2) const
 
float angle_to_point (const Vector2 &p_vector2) const
 
float dot (const Vector2 &p_other) const
 
float cross (const Vector2 &p_other) const
 
Vector2 cross (real_t p_other) const
 
Vector2 project (const Vector2 &p_vec) const
 
Vector2 plane_project (real_t p_d, const Vector2 &p_vec) const
 
Vector2 clamped (real_t p_len) const
 
_FORCE_INLINE_ Vector2 linear_interpolate (const Vector2 &p_b, float p_t) const
 
Vector2 cubic_interpolate (const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, float p_t) const
 
Vector2 cubic_interpolate_soft (const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, float p_t) const
 
Vector2 slide (const Vector2 &p_vec) const
 
Vector2 reflect (const Vector2 &p_vec) const
 
Vector2 operator+ (const Vector2 &p_v) const
 
void operator+= (const Vector2 &p_v)
 
Vector2 operator- (const Vector2 &p_v) const
 
void operator-= (const Vector2 &p_v)
 
Vector2 operator* (const Vector2 &p_v1) const
 
Vector2 operator* (const float &rvalue) const
 
void operator*= (const float &rvalue)
 
void operator*= (const Vector2 &rvalue)
 
Vector2 operator/ (const Vector2 &p_v1) const
 
Vector2 operator/ (const float &rvalue) const
 
void operator/= (const float &rvalue)
 
Vector2 operator- () const
 
bool operator== (const Vector2 &p_vec2) const
 
bool operator!= (const Vector2 &p_vec2) const
 
bool operator< (const Vector2 &p_vec2) const
 
bool operator<= (const Vector2 &p_vec2) const
 
real_t angle () const
 
void set_rotation (float p_radians)
 
_FORCE_INLINE_ Vector2 abs () const
 
Vector2 rotated (float p_by) const
 
Vector2 tangent () const
 
Vector2 floor () const
 
Vector2 snapped (const Vector2 &p_by) const
 
float get_aspect () const
 
 operator String () const
 
_FORCE_INLINE_ Vector2 (float p_x, float p_y)
 

Static Public Member Functions

static _FORCE_INLINE_ Vector2 linear_interpolate (const Vector2 &p_a, const Vector2 &p_b, float p_t)
 

Public Attributes

union {
   float   x
 
   float   width
 
}; 
 
union {
   float   y
 
   float   height
 
}; 
 

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