1 2 3 4 5 6 7 8 9 10 11
/// A Vector2 type containing X and Y. pub struct Vector2<T> { pub x: T, pub y: T, } impl<T> Vector2<T> { pub fn new(x: T, y: T) -> Self { Self { x, y } } }