rustgd / cgmath

A linear algebra and mathematics library for computer graphics.
https://docs.rs/cgmath
Apache License 2.0
1.13k stars 155 forks source link

Added project_on to InnerSpace #420

Closed maplant closed 7 years ago

maplant commented 7 years ago

Adds a project method to InnerSpace. IMPORTANT NOTE: I did not check to see if this compiles because I am a bad person :( I thought I should ask before doing that, should a test be added for this? The correctness of this method somewhat relies on dot and magnitude2 being correct.

brendanzab commented 7 years ago

I think it would be nice to have some tests. Alas, I have also been bad in adding tests to cgmath, and there are various ways that I have implemented them in the library. Could you have a go at adding them anyway?

brendanzab commented 7 years ago

Sorry for the late reply - got back from holidays this week and have been fighting jet lag!

maplant commented 7 years ago

Sure, I'll add a few tests when I have some time. And no problem with the late reply, I'm not waiting on this to go through or anything like that. Just thought it would be a useful method.

maplant commented 7 years ago

Hey brendan, just managed to subdue my laziness and add some tests. Hope they work for you!

brendanzab commented 7 years ago

Thanks! ❤️