pub struct Vector(/* private fields */);Available on crate feature
luau only.Expand description
A Luau vector type.
By default vectors are 3-dimensional, but can be 4-dimensional
if the luau-vector4 feature is enabled.
Implementations§
Source§impl Vector
impl Vector
Sourcepub const fn new(x: f32, y: f32, z: f32) -> Self
Available on (crate features luau) and non-crate feature luau-vector4 only.
pub const fn new(x: f32, y: f32, z: f32) -> Self
luau) and non-crate feature luau-vector4 only.Creates a new vector.
Sourcepub const fn x(&self) -> f32
Available on crate features luau only.
pub const fn x(&self) -> f32
luau only.Returns 1st component of the vector.
Sourcepub const fn y(&self) -> f32
Available on crate features luau only.
pub const fn y(&self) -> f32
luau only.Returns 2nd component of the vector.
Trait Implementations§
Source§impl Serialize for Vector
Available on (crate features luau) and crate feature serialize only.
impl Serialize for Vector
Available on (crate features
luau) and crate feature serialize only.impl Copy for Vector
Available on crate features
luau only.impl StructuralPartialEq for Vector
Available on crate features
luau only.Auto Trait Implementations§
impl Freeze for Vector
impl RefUnwindSafe for Vector
impl Send for Vector
impl Sync for Vector
impl Unpin for Vector
impl UnwindSafe for Vector
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)