mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
make vector2d new const (#383)
This commit is contained in:
commit
f293f8c48d
|
@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
- Made Vector2D::new a const function
|
||||
|
||||
### Fixed
|
||||
- Alpha channel is now considered by `include_gfx!()` even when `transparent_colour` is absent.
|
||||
|
||||
|
|
|
@ -980,7 +980,7 @@ impl<T: Number> Vector2D<T> {
|
|||
/// assert_eq!(v.x, 1);
|
||||
/// 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 }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue