struct VectorMath::Vec4
- VectorMath::Vec4
- Struct
- Value
- Object
Overview
An immutable set of x/y/z/w homogeneous coordinates
Defined in:
vector_math/vectors.crConstructors
- .new(x : Float64 = 0.0, y : Float64 = 0.0, z : Float64 = 0.0, w : Float64 = 1.0)
- .new(values : Array(Float64))
Class Method Summary
Instance Method Summary
- #*(scalar)
- #+(other)
- #-(other)
- #/(scalar)
- #mag
- #normalize
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #to_vec3
- #w : Float64
- #x : Float64
- #y : Float64
- #z : Float64
Constructor Detail
Class Method Detail
Instance Method Detail
def to_s
#
Description copied from class Object
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO)
which can be overridden for custom implementations.
Also see #inspect
.