491: Fix Matrix2::look_at, add look_at_stable r=kvark a=blargg ## Changes 1. Fixes `Matrix2::look_at` 2. Adds tests for `look_at` 3. Adds a new function, `look_at_stable` ## Notes I added a new function for 2d look at rotation. `look_at` is a bit weird in practice for 2d. For example, if you are making a basis matrix to orient a 2d character to look at a point, `look_at` will flip the character as they rotate past `up` or `-up` vectors. This is the best match for what look_at is supposed to do, I think. `look_at_stable` will not flip based on orientation, you just pass in which way to flip. This is a bit easier to use to rotate 2d characters. `look_at_stable` could have a better name. I think we can also consider removing the flip param, and just let the user flip the matrix with a transform later. Co-authored-by: blargg <tomjankauski@gmail.com> |
||
---|---|---|
.. | ||
angle.rs | ||
matrix.rs | ||
point.rs | ||
projection.rs | ||
quaternion.rs | ||
rotation.rs | ||
swizzle.rs | ||
transform.rs | ||
vector.rs | ||
vector4f32.rs |