struct

Harmonica::Vector

Inherits Struct < Value < Object

Represents a vector carrying a magnitude and a direction. We represent the vector as a point from the origin (0, 0) where the magnitude is the Euclidean distance from the origin and the direction is the direction to the point from the origin.

Constructors

new(x : Float64, y : Float64, z : Float64 = 0.0)
Source

Instance methods