Type Definition speedy2d::dimen::Vec2

source · []
pub type Vec2 = Vector2<f32>;
Expand description

A vector with two f32 values.

Implementations

Returns the magnitude of the vector, squared.

Returns the magnitude of the vector.

Normalizes the vector so that the magnitude is 1.0. If the current magnitude of the vector is 0.0, then None is returned to avoid a division by zero.