Scalar

Type Alias Scalar 

Source
pub type Scalar = f32;
Expand description

Scalar number type.

by default it is 32-bit flaot but you can change it to 64-bit float with scalar64 feature.

Trait Implementations§

Source§

impl Curved for Scalar

Source§

const AXES: usize = 1usize

Source§

fn zero() -> Self

Source§

fn one() -> Self

Source§

fn negate(&self) -> Self

Source§

fn scale(&self, value: Scalar) -> Self

Source§

fn inverse_scale(&self, value: Scalar) -> Self

Source§

fn length(&self) -> Scalar

Source§

fn length_squared(&self) -> Scalar

Source§

fn get_axis(&self, index: usize) -> Option<Scalar>

Source§

fn set_axis(&mut self, index: usize, value: Scalar)

Source§

fn interpolate(&self, other: &Self, factor: Scalar) -> Self

Source§

fn is_valid(&self) -> bool

Source§

fn normalize(&self) -> Self
where Self: Sized,

Source§

fn perpendicular(&self, _guide: Option<&Self>) -> Option<Self>
where Self: Sized,

Source§

impl CurvedChange for Scalar

Source§

fn offset(&self, other: &Self) -> Self

Source§

fn delta(&self, other: &Self) -> Self

Source§

fn dot(&self, other: &Self) -> Scalar

Source§

fn minimum(&self, other: &Self) -> Self

Source§

fn maximum(&self, other: &Self) -> Self

Source§

fn is_nearly_equal_to(&self, other: &Self, epsilon: Scalar) -> bool
where Self: Curved + Sized,

Source§

fn project_on_plane(&self, plane_origin: &Self, plane_normal: &Self) -> Self
where Self: Curved + Sized,

Source§

fn project_on_segment(&self, origin: &Self, direction: &Self) -> Self
where Self: Curved + Sized,