[][src]Struct mini_math::Point

#[repr(C)]
pub struct Point {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}

A point in 3D space.

Fields

x: f32y: f32z: f32

Methods

impl Point[src]

pub fn new(x: f32, y: f32, z: f32) -> Self[src]

Create a new point from x, y, z coordinates

pub fn zero() -> Self[src]

The additive identity

pub fn one() -> Self[src]

The multiplicative identity

Trait Implementations

impl<'_> NearlyEqual for &'_ Point[src]

impl From<Vector> for Point[src]

fn from(v: Vector) -> Self[src]

Convert a vector into a point

impl From<Point> for Vector[src]

fn from(p: Point) -> Self[src]

Convert a point into a vector

impl Clone for Point[src]

impl Copy for Point[src]

impl PartialEq<Point> for Point[src]

impl Debug for Point[src]

impl Div<f32> for Point[src]

type Output = Point

The resulting type after applying the / operator.

impl Sub<f32> for Point[src]

type Output = Point

The resulting type after applying the - operator.

impl Sub<Vector> for Point[src]

type Output = Point

The resulting type after applying the - operator.

impl Sub<Point> for Point[src]

type Output = Vector

The resulting type after applying the - operator.

impl Add<f32> for Point[src]

type Output = Point

The resulting type after applying the + operator.

impl Add<Vector> for Point[src]

type Output = Point

The resulting type after applying the + operator.

impl Mul<Point> for Matrix[src]

type Output = Point

The resulting type after applying the * operator.

impl Mul<f32> for Point[src]

type Output = Point

The resulting type after applying the * operator.

impl AddAssign<f32> for Point[src]

impl AddAssign<Vector> for Point[src]

impl SubAssign<f32> for Point[src]

impl SubAssign<Vector> for Point[src]

impl MulAssign<f32> for Point[src]

impl DivAssign<f32> for Point[src]

impl StructuralPartialEq for Point[src]

impl AsBytes for Point[src]

impl FromBytes for Point[src]

Auto Trait Implementations

impl Send for Point

impl Sync for Point

impl Unpin for Point

impl UnwindSafe for Point

impl RefUnwindSafe for Point

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]