For example: template<class T> struct vec<T,4> { // ... vec<T,4> projected_onto(vec<T,4> const& v) { return (dot(*this,v)/dot(v,v)) * v;} vec<T,4> rejection_from(vec<T,4> const& v) { return *this - this->projected_onto(v); } // ... } I feel like `projection_onto()` at least is common enough to warrant inclusion.
For example:
I feel like
projection_onto()at least is common enough to warrant inclusion.