|
40 | 40 | Self: iter::Product<Self>,
|
41 | 41 | {
|
42 | 42 | /// Create a rotation to a given direction with an 'up' vector.
|
43 |
| - fn look_at(dir: P::Diff, up: P::Diff) -> Self; |
| 43 | + #[deprecated = "Use Rotation::look_to"] |
| 44 | + fn look_at(dir: P::Diff, up: P::Diff) -> Self { |
| 45 | + Self::look_to(dir, up) |
| 46 | + } |
| 47 | + |
| 48 | + /// Create a rotation to a given direction with an 'up' vector. |
| 49 | + fn look_to(dir: P::Diff, up: P::Diff) -> Self; |
44 | 50 |
|
45 | 51 | /// Create a shortest rotation to transform vector 'a' into 'b'.
|
46 | 52 | /// Both given vectors are assumed to have unit length.
|
@@ -185,7 +191,7 @@ impl<'a, S: 'a + BaseFloat> iter::Product<&'a Basis2<S>> for Basis2<S> {
|
185 | 191 |
|
186 | 192 | impl<S: BaseFloat> Rotation<Point2<S>> for Basis2<S> {
|
187 | 193 | #[inline]
|
188 |
| - fn look_at(dir: Vector2<S>, up: Vector2<S>) -> Basis2<S> { |
| 194 | + fn look_to(dir: Vector2<S>, up: Vector2<S>) -> Basis2<S> { |
189 | 195 | Basis2 {
|
190 | 196 | mat: Matrix2::look_to(dir, up),
|
191 | 197 | }
|
@@ -336,7 +342,7 @@ impl<'a, S: 'a + BaseFloat> iter::Product<&'a Basis3<S>> for Basis3<S> {
|
336 | 342 |
|
337 | 343 | impl<S: BaseFloat> Rotation<Point3<S>> for Basis3<S> {
|
338 | 344 | #[inline]
|
339 |
| - fn look_at(dir: Vector3<S>, up: Vector3<S>) -> Basis3<S> { |
| 345 | + fn look_to(dir: Vector3<S>, up: Vector3<S>) -> Basis3<S> { |
340 | 346 | Basis3 {
|
341 | 347 | mat: Matrix3::look_at(dir, up),
|
342 | 348 | }
|
|
0 commit comments