class Mittsu::Vector
- Mittsu::Vector
- Reference
- Object
Direct Known Subclasses
Defined in:
mittsu/math/vector.crConstructors
Instance Method Summary
-
#==(v)
Returns
false
(other can only be aValue
here). - #[](index)
- #[]=(index, value)
- #add(v)
- #add_scalar(s)
- #add_vectors(a, b)
- #angle_to(v)
- #ceil
- #clamp(min, max)
- #clamp_scalar(min, max)
- #clone
- #copy(v)
- #dimensions : Int32
- #distance_to(v)
- #divide(v)
- #divide_scalar(s)
- #each_dimension(&)
- #elements : Array(Float64)
- #elements=(elements : Array(Float64))
- #floor
- #from_array(array, offset = 0)
- #index
- #index=(index)
- #length
- #length_sq
- #lerp(v, alpha)
- #lerp_vectors(v1, v2, alpha)
- #max(v)
- #min(v)
- #multiply(v)
- #multiply_scalar(s)
- #multiply_vectors(a, b)
- #negate
- #normalize
- #project_on_plane(plane_normal)
- #project_on_vector(vector)
- #reflect(normal)
- #round
- #round_to_zero
- #set(elements : Array(Float64))
- #set_length(l)
- #sub(v)
- #sub_scalar(s)
- #sub_vectors(a, b)
-
#to_a(array = [] of Float64, offset = 0)
alias :to_a :to_array
- #to_array(array = [] of Float64, offset = 0)
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #uv
- #uv=(uv)
Constructor 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
.