pub struct Location {
pub x: f64,
pub y: f64,
pub z: f64,
}
Fields§
§x: f64
§y: f64
§z: f64
Implementations§
Source§impl Location
impl Location
pub fn dist2(&self, loc: Location) -> f64
pub fn apply_change(&mut self, loc: LocationOrigin)
Trait Implementations§
Source§impl Add<Displacement> for Location
impl Add<Displacement> for Location
Source§impl Add<LocationOrigin> for Location
impl Add<LocationOrigin> for Location
Source§impl AddAssign for Location
impl AddAssign for Location
Source§fn add_assign(&mut self, rhs: Location)
fn add_assign(&mut self, rhs: Location)
Performs the
+=
operation. Read moreSource§impl ByteReadable for Location
impl ByteReadable for Location
fn read_from_bytes(byte_reader: &mut ByteReader) -> Self
Source§impl ByteWritable for Location
impl ByteWritable for Location
fn write_to_bytes(self, writer: &mut ByteWriter)
Source§impl From<Location> for BlockLocation
impl From<Location> for BlockLocation
Source§impl From<Location> for ChunkLocation
impl From<Location> for ChunkLocation
Source§impl From<Location> for LocationOrigin
impl From<Location> for LocationOrigin
Source§impl From<LocationFloat> for Location
impl From<LocationFloat> for Location
Source§fn from(loc: LocationFloat) -> Self
fn from(loc: LocationFloat) -> Self
Converts to this type from the input type.
Source§impl Sub<Displacement> for Location
impl Sub<Displacement> for Location
impl Copy for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more