Struct mcpi_api::Vec3[][src]

pub struct Vec3 {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}

Struct used to specify entity positions.

Fields

x: f32y: f32z: f32

Implementations

impl Vec3[src]

pub fn from(x: f32, y: f32, z: f32) -> Vec3[src]

Function to generate a Vec3 from 3 f32’s

pub fn from_vector(vec: &Vec<f32>) -> Vec3[src]

Function to generate a Vec3 from a Vec

Panics

This function panics if the vector contains less then 3 elements

Trait Implementations

impl Debug for Vec3[src]

Auto Trait Implementations

impl RefUnwindSafe for Vec3

impl Send for Vec3

impl Sync for Vec3

impl Unpin for Vec3

impl UnwindSafe for Vec3

Blanket Implementations

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

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

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

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

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

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.