ombre: Fix `Vector2D` map function types
794d5aa4c60f9670a7277186f5340d91502adf25
1 parent
481f9531
ombre/src/math/algebra.rs
+1 -1
| 248 | 248 | /// Extend vector to three dimensions. |
|
| 249 | 249 | pub fn extend(self, z: S) -> Vector3D<S, U> { |
|
| 250 | 250 | Vector3D::new(self.x, self.y, z) |
|
| 251 | 251 | } |
|
| 252 | 252 | ||
| 253 | - | pub fn map<F, T>(self, mut f: F) -> Vector2D<T> |
|
| 253 | + | pub fn map<F, T>(self, mut f: F) -> Vector2D<T, U> |
|
| 254 | 254 | where |
|
| 255 | 255 | T: Copy, |
|
| 256 | 256 | F: FnMut(S) -> T, |
|
| 257 | 257 | { |
|
| 258 | 258 | Vector2D::new(f(self.x), f(self.y)) |