class_vector2 - vkbsb/godot GitHub Wiki
Vector2
####Category: Built-In Types
Brief Description
Vector used for 2D Math.
Member Functions
- float angle_to ( Vector2 to )
- float angle_to_point ( Vector2 to )
- float atan2 ( )
- Vector2 cubic_interpolate ( Vector2 b, Vector2 pre_a, Vector2 post_b, float t )
- float distance_squared_to ( Vector2 to )
- float distance_to ( Vector2 to )
- float dot ( Vector2 with )
- Vector2 floor ( )
- Vector2 floorf ( )
- float get_aspect ( )
- float length ( )
- float length_squared ( )
- Vector2 linear_interpolate ( Vector2 b, float t )
- Vector2 normalized ( )
- float reflect ( Vector2 vec )
- Vector2 rotated ( float phi )
- float slide ( Vector2 vec )
- Vector2 snapped ( Vector2 by )
- Vector2 tangent ( )
- void Vector2 ( float x, float y )
Member Variables
Member Function Description
distance_to
Returns the distance to vector "b".
dot
Returns the dot product with vector "b".
floor
- Vector2 floor ( )
Remove the fractional part of x and y.
length
- float length ( )
Returns the length of the vector.
linear_interpolate
Returns the result of the linear interpolation between this vector and "b", by amount "i".
normalized
- Vector2 normalized ( )
Returns a normalized vector to unit length.