pub struct Vector2 {
pub x: f32,
pub y: f32,
}Expand description
2D vector in Cotis pixel space.
Coordinates are interpreted as screen-space values (origin in the top-left, positive Y downward) by the default Cotis layout/render pipeline.
§Serialization
When the serialization feature is enabled this type derives
serde::Serialize and serde::Deserialize.
Fields§
§x: f32Horizontal component in pixels.
y: f32Vertical component in pixels.
Implementations§
Trait Implementations§
impl Copy for Vector2
impl StructuralPartialEq for Vector2
Auto Trait Implementations§
impl Freeze for Vector2
impl RefUnwindSafe for Vector2
impl Send for Vector2
impl Sync for Vector2
impl Unpin for Vector2
impl UnsafeUnpin for Vector2
impl UnwindSafe for Vector2
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