Mittsu::Vector
Inherits Reference < Object
Constructors
new(elements : Array(Float64))
SourceInstance methods
[](index)
Source[]=(index, value)
Sourceadd(v)
Sourceadd_scalar(s)
Sourceadd_vectors(a, b)
Sourceangle_to(v)
Sourceceil
Sourceclamp(min, max)
Sourceclamp_scalar(min, max)
Sourceclone
Sourcecopy(v)
Sourcedimensions
Sourcedistance_to(v)
Sourcedivide(v)
Sourcedivide_scalar(s)
Sourceeach_dimension
Sourceelements
Sourceelements=(elements : Array(Float64))
Sourcefloor
Sourcefrom_array(array, offset = 0)
Sourceindex
Sourceindex=(index)
Sourcelength
Sourcelength_sq
Sourcelerp(v, alpha)
Sourcelerp_vectors(v1, v2, alpha)
Sourcemax(v)
Sourcemin(v)
Sourcemultiply(v)
Sourcemultiply_scalar(s)
Sourcemultiply_vectors(a, b)
Sourcenegate
Sourcenormalize
Sourceproject_on_plane(plane_normal)
Sourceproject_on_vector(vector)
Sourcereflect(normal)
Sourceround
Sourceround_to_zero
Sourceset(elements : Array(Float64))
Sourceset_length(l)
Sourcesub(v)
Sourcesub_scalar(s)
Sourcesub_vectors(a, b)
Sourceto_array(array = [] of Float64, offset = 0)
Sourceto_s
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.
uv
Sourceuv=(uv)
Source