pub struct V<T> {
pub x: T,
pub y: T,
}Expand description
A 2-D vector.
Fields§
§x: T§y: TImplementations§
Source§impl<T: Scalar> V<T>
impl<T: Scalar> V<T>
pub fn new(x: T, y: T) -> Self
pub fn cst(p: [f64; 2]) -> Self
pub fn add(self, o: Self) -> Self
pub fn sub(self, o: Self) -> Self
pub fn scale(self, s: T) -> Self
pub fn dot(self, o: Self) -> T
pub fn cross(self, o: Self) -> T
pub fn norm(self) -> GeopResult<T>
pub fn unit(self) -> GeopResult<Self>
pub fn value(self) -> [f64; 2]
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for V<T>where
T: Freeze,
impl<T> RefUnwindSafe for V<T>where
T: RefUnwindSafe,
impl<T> Send for V<T>where
T: Send,
impl<T> Sync for V<T>where
T: Sync,
impl<T> Unpin for V<T>where
T: Unpin,
impl<T> UnsafeUnpin for V<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for V<T>where
T: UnwindSafe,
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