mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
make vector2d new const
This commit is contained in:
parent
64bd1ad7dd
commit
f0dd544394
|
@ -980,7 +980,7 @@ impl<T: Number> Vector2D<T> {
|
||||||
/// assert_eq!(v.x, 1);
|
/// assert_eq!(v.x, 1);
|
||||||
/// assert_eq!(v.y, 2);
|
/// assert_eq!(v.y, 2);
|
||||||
/// ```
|
/// ```
|
||||||
pub fn new(x: T, y: T) -> Self {
|
pub const fn new(x: T, y: T) -> Self {
|
||||||
Vector2D { x, y }
|
Vector2D { x, y }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue