Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 852 vs 853 for /trunk/Source Code/Core/Math/Headers/MathVectors.inl

Diff revisions: vs.
  @@ -72,6 +72,16 @@
72 72 }
73 73
74 74 template <typename T>
75 + inline void OrthoNormalize(vec2<T> &v1, vec2<T> &v2) {
76 + vec2<T>& n(v1); vec2<T>& u(v2);
77 +
78 + n.normalize();
79 + vec2<T> v(Cross(n, u));
80 + v.normalize();
81 + u.set(Cross(v, n));
82 + }
83 +
84 + template <typename T>
75 85 inline vec3<T> Normalize(vec3<T> &vector) {
76 86 vector.normalize();
77 87 return vector;
  @@ -108,6 +118,16 @@
108 118 return vec3<T>(v.z, v.y, v.x);
109 119 }
110 120
121 + template <typename T>
122 + inline void OrthoNormalize(vec3<T> &v1, vec3<T> &v2) {
123 + vec3<T>& n(v1); vec3<T>& u(v2);
124 +
125 + n.normalize();
126 + vec3<T> v(Cross(n, u));
127 + v.normalize();
128 + u.set(Cross(v, n));
129 + }
130 +
111 131 /// min/max functions
112 132 template <typename T>
113 133 inline vec4<T> Min(const vec4<T> &v1, const vec4<T> &v2) {