class Prism::Maths::Vector2f
- Prism::Maths::Vector2f
- Reference
- Object
Defined in:
prism/maths/vector2f.crConstructors
Instance Method Summary
-
#*(r : Float32) : Vector2f
Multiplies the vector with a scalar
-
#*(r : Vector2f) : Vector2f
Multiplies two vectors
-
#+(r : Vector2f) : Vector2f
Adds two vectors
-
#+(r : Float32) : Vector2f
Adds a scalar value to the vector
-
#-(r : Vector2f) : Vector2f
Subtracts two vectors
-
#-(r : Float32) : Vector2f
Subtracts a scalar value from the vector
-
#/(r : Float32) : Vector2f
Divides the vector by a scalar
-
#/(r : Vector2f) : Vector2f
Divides two vectors
- #==(r : Vector2f) : Bool
- #abs : Vector2f
- #cross(r : Vector2f) : Float32
-
#dot(r : Vectorf2) : Float32
Returns the dot product of the vectors
-
#length : Float32
Returns the length the vector (pythagorean theorem)
- #lerp(dest : Vector2f, lerp_factor : Float32) : Vector2f
-
#max
Returns the maximum component size
-
#rotate(angle : Float32) : Vector2f
Rotates the vector by some angle in radians
- #set(x : Float32, y : Float32)
- #set(r : Vector2f)
-
#to_normalized : Vector2f
Normalizes this vector to a length of 1
-
#to_s
Returns a string representation of this object.
- #x : Float32
- #x=(x)
- #y : Float32
- #y=(y : Float32)
Constructor Detail
Instance Method Detail
def to_s
#
Description copied from class Object
Returns a string representation of this object.
Descendants must usually not override this method. Instead,
they must override to_s(io)
, which must append to the given
IO object.