|
D Paste by joecoder
Description: None
|
1 2 3 4 5 6 | // scale() scales a vector by its input // dot() is the dot product of this vector and another // lengt2() returns the length of the vector squared. Vec3f projection(Vec3f s) { return s.scale(dot(s)/s.length2()); } |