module Boleite::Vector

Defined in:

boleite/math/vector.cr

Class Method Summary

Class Method Detail

def self.clamp(value : VectorImp(T, N), min : VectorImp(T, N), max : VectorImp(T, N)) forall T, N #

[View source]
def self.closest_point_on_segment(a : VectorImp(T, 3), b : VectorImp(T, 3), point : VectorImp(T, 3), clamp = true) forall T #

[View source]
def self.cross(left : VectorImp(T, 3), right : VectorImp(T, 3)) forall T #

[View source]
def self.distance_to_ray(origin : VectorImp(T, 3), dir : VectorImp(T, 3), point : VectorImp(T, 3)) forall T #

[View source]
def self.distance_to_segment(a : VectorImp(T, 3), b : VectorImp(T, 3), point : VectorImp(T, 3), clamp = true) forall T #

[View source]
def self.dot(left : VectorImp(T, N), right : VectorImp(T, N)) forall T, N #

[View source]
def self.inside_shape?(v : Indexable(VectorImp(T, 2)), p : VectorImp(T, 2)) forall T #

[View source]
def self.magnitude(value : VectorImp(T, N)) forall T, N #

[View source]
def self.max(left : VectorImp(T, N), right : VectorImp(T, N)) forall T, N #

[View source]
def self.min(left : VectorImp(T, N), right : VectorImp(T, N)) forall T, N #

[View source]
def self.normalize(value : VectorImp(T, N)) forall T, N #

[View source]
def self.rotate(v : VectorImp(T, 2), radians) forall T #

[View source]
def self.square_magnitude(value : VectorImp(T, N)) forall T, N #

[View source]