Spherical.R3.Vector

Represents a point in ℝ³.

Source

Summary

abs(vector)

Returns the vector with non-negative components

add(first, second)

Returns the standard vector sum of first and second

angle(first, second)

Returns the angle between first and second

approx_equal(first, second)

Checks whether first and second are equal within a small epsilon

cross(first, second)

Returns the standard cross product of first and second

distance(first, second)

Returns the Euclidean distance between first and second

dot(first, second)

Returns the standard dot product of first and second

is_unit?(vector)

Checks whether vector is of approximately unit length

mul(vector, m)

Returns the standard scalar product of vector and m

new()

Returns an empty vector

new(x, y, z)

Returns a vector with the given coordinates

norm(vector)

Returns the vector’s norm

normalize(vector)

Returns a unit vector in the same direction as vector

orthogonal(vector)

Returns a unit vector that is orthogonal to vector

square_norm(vector)

Returns the square of the vector’s norm

sub(first, second)

Returns the standard vector difference of first and second

Types

t :: %Spherical.R3.Vector{x: number, y: number, z: number}

Functions

abs(vector)

Returns the vector with non-negative components.

Source
add(first, second)

Returns the standard vector sum of first and second.

Source
angle(first, second)

Returns the angle between first and second.

Source
approx_equal(first, second)

Checks whether first and second are equal within a small epsilon.

Source
cross(first, second)

Returns the standard cross product of first and second.

Source
distance(first, second)

Returns the Euclidean distance between first and second.

Source
dot(first, second)

Returns the standard dot product of first and second.

Source
is_unit?(vector)

Checks whether vector is of approximately unit length.

Source
mul(vector, m)

Returns the standard scalar product of vector and m.

Source
new()

Returns an empty vector.

Source
new(x, y, z)

Returns a vector with the given coordinates.

Source
norm(vector)

Returns the vector’s norm.

Source
normalize(vector)

Returns a unit vector in the same direction as vector.

Source
orthogonal(vector)

Returns a unit vector that is orthogonal to vector.

Ortho(-vector) = -Ortho(vector) for all vector.

Source
square_norm(vector)

Returns the square of the vector’s norm.

Source
sub(first, second)

Returns the standard vector difference of first and second.

Source