pub struct Point {
pub x: f64,
pub y: f64,
}
Fields§
§x: f64
§y: f64
Implementations§
Source§impl Point
impl Point
pub fn zero() -> Point
pub fn new(x: f64, y: f64) -> Point
pub fn splat(s: f64) -> Point
pub fn neg(&self) -> Point
pub fn add(&self, other: Point) -> Point
pub fn sub(&self, other: Point) -> Point
pub fn distance_to(&self, other: Point) -> f64
pub fn length(&self) -> f64
pub fn scale(&self, s: f64) -> Point
pub fn transpose(&self) -> Point
pub fn rotate_around(&self, center: Point, angle: f64) -> Point
pub fn rotate(&self, angle: f64) -> Point
Trait Implementations§
impl Copy for Point
impl StructuralPartialEq for Point
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
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