projection
parent
4b4f95af81
commit
edfca12b18
|
@ -141,6 +141,12 @@ namespace blt {
|
|||
left.z() * right.x() - left.x() * right.z(),
|
||||
left.x() * right.y() - left.y() * right.x()};
|
||||
}
|
||||
|
||||
static inline vec<T, size> project(const vec<T, size>& u, const vec<T, size>& v){
|
||||
float du = dot(u);
|
||||
float dv = dot(v);
|
||||
return (du / dv) * v;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, unsigned long size>
|
||||
|
|
Loading…
Reference in New Issue