pub struct UVec2 {
pub x: u16,
pub y: u16,
}
Expand description
A 2D vector with unsigned integer coordinates.
This struct is used to represent positions or dimensions in a grid where negative coordinates are not applicable.
§Examples
use int_math::prelude::*;
let position = UVec2::new(5, 10);
println!("{:?}", position); // Output: UVec2 { x: 5, y: 10 }
§Fields
x
: The bottom-left x-coordinate (horizontal position) of the vector.y
: The bottom-left y-coordinate (vertical position) of the vector.
Fields§
§x: u16
§y: u16
Implementations§
Trait Implementations§
impl Copy for UVec2
impl Eq for UVec2
impl StructuralPartialEq for UVec2
Auto Trait Implementations§
impl Freeze for UVec2
impl RefUnwindSafe for UVec2
impl Send for UVec2
impl Sync for UVec2
impl Unpin for UVec2
impl UnwindSafe for UVec2
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