View Source Zenic.Math.Vector3 (Zenic v0.1.0)

Summary

Types

@type t() :: {x :: number(), y :: number(), z :: number()}

Functions

Link to this function

add(vector3_a, vector3_b)

View Source
@spec add(vector3_a :: t(), vector3_b :: t()) :: t()
@spec clamp(vector3 :: t(), min :: t(), max :: t()) :: t()
Link to this function

cross(vector3_a, vector3_b)

View Source
@spec cross(vector3_a :: t(), vector3_b :: t()) :: t()
Link to this function

distance(vector3_a, vector3_b)

View Source
@spec distance(vector3_a :: t(), vector3_b :: t()) :: number()
Link to this function

distance_squared(vector3_a, vector3_b)

View Source
@spec distance_squared(vector3_a :: t(), vector3_b :: t()) :: number()
@spec div(vector3 :: t(), scalar :: number()) :: t()
Link to this function

dot(vector3_a, vector3_b)

View Source
@spec dot(vector3_a :: t(), vector3_b :: t()) :: number()
@spec length(vector3 :: t()) :: number()
@spec length_squared(vector3 :: t()) :: number()
Link to this function

lerp(vector_a, vector_a, t)

View Source
@spec lerp(vector_a :: t(), vector_b :: t(), t :: number()) :: t()
Link to this function

mul(vector3, multiplier)

View Source
@spec mul(vector3 :: t(), scalar :: number() | t()) :: t()
@spec normalize(vector3 :: t()) :: t()
@spec project(vector :: t(), matrix :: Scenic.Math.matrix()) :: t()
Link to this function

reflect(vector3, normal)

View Source
@spec reflect(vector3 :: t(), normal :: t()) :: t()
Link to this function

sub(vector3_a, vector3_b)

View Source
@spec sub(vector3_a :: t(), vector3_b :: t()) :: t()
@spec truncate(vector :: t()) :: t()