LA::AVector1
Inherits Struct < Value < Object
Constants
COMPONENTS = [:x]
Constructors
new(default : Float64 = 0.0)
Class methods
one
x
Generate some utility constants like
Vector3::Y => Vector3(0.0, 1.0, 0.0)
zero
Instance methods
*(other : Float64)
+(other : self)
-(other : self)
-
/(other : Float64)
dot(other : self)
length
normalize
If the vector has just one component precalculating the inverse would not improve the performance TODO: validate if precalculating is faster for 2 components
squared_length
x
x=(x : Float64)