struct Oid::Vector4
- Oid::Vector4
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
- Oid::Vector
Defined in:
oid/resources/vectors/vector4.crConstructors
- .new(x, y, z, w)
- .new(angle : Float64, vector : Vector3)
- .new(pull : JSON::PullParser)
- .new(x : Float64 = 0.0, y : Float64 = 0.0, z : Float64 = 0.0, w : Float64 = 1.0)
Class Method Summary
-
.zero
Zero vector
Instance Method Summary
- #!=(other : Vector)
-
#*(other : Vector)
Performs component multiplication (for dot product see
#dot
) -
#*(other : Float64)
Performs multiplication
-
#+(other : Float64)
Performs component addition
- #+(other)
-
#-(other : Vector)
Performs component subtraction
- #-(other : Float64)
-
#-
Returns negated vector
- #/(other : Vector)
- #==(other : Vector)
- #clone
-
#cross(other)
Cross product
- #distance(other : Vector)
-
#dot(other)
Dot product
- #magnitude
-
#normalize!
Normalizes current vector
- #to_v3
- #values
- #w : Float64
- #w=(w : Float64)
- #x : Float64
- #x=(x : Float64)
- #y : Float64
- #y=(y : Float64)
- #z : Float64
- #z=(z : Float64)
- #zero!
Instance methods inherited from module Oid::Vector
!=(other)
!=,
%(other : Vector)
%,
*(other : Vector)*(other : Float64) *, **(other : Vector) **, +(other : Vector)
+(other : Float64) +, -(other : Vector)
- -, /(other : Vector)
/(other : Float64) /, ==(other) ==, clone
clone(&b) clone, cross(other) cross, distance(other : Vector) distance, dot(other) dot, heading heading, mag mag, magnitude magnitude, normalize normalize, normalize! normalize!, values values, zero! zero!
Constructor Detail
Class Method Detail
Instance Method Detail
Description copied from module Oid::Vector
Performs component multiplication (for dot product see #dot
)
Description copied from module Oid::Vector
Performs component subtraction