Struct Projection2
pub struct Projection2 { /* private fields */ }Expand description
A tiny 2D projection descriptor.
Implementations§
§impl Projection2
impl Projection2
pub const fn new(kind: ProjectionKind, scale: f64) -> Option<Projection2>
pub const fn new(kind: ProjectionKind, scale: f64) -> Option<Projection2>
Creates a projection with a positive finite scale.
pub const fn kind(self) -> ProjectionKind
pub const fn kind(self) -> ProjectionKind
Returns the projection kind.
pub fn project_x_axis(self, point: Point2) -> f64
pub fn project_x_axis(self, point: Point2) -> f64
Projects a point onto the x axis and applies the projection scale.
Trait Implementations§
§impl Clone for Projection2
impl Clone for Projection2
§fn clone(&self) -> Projection2
fn clone(&self) -> Projection2
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for Projection2
impl Debug for Projection2
§impl PartialEq for Projection2
impl PartialEq for Projection2
impl Copy for Projection2
impl StructuralPartialEq for Projection2
Auto Trait Implementations§
impl Freeze for Projection2
impl RefUnwindSafe for Projection2
impl Send for Projection2
impl Sync for Projection2
impl Unpin for Projection2
impl UnsafeUnpin for Projection2
impl UnwindSafe for Projection2
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