This website works better with JavaScript.
Home
Help
Sign In
lolengine
/
lol
mirror of
https://github.com/lolengine/lol
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
0
Wiki
Activity
Browse Source
math: add distance() function for vectors.
undefined
Sam Hocevar
11 years ago
parent
9df9440e67
commit
7d230d7674
1 changed files
with
6 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-0
src/lol/math/vector.h
+ 6
- 0
src/lol/math/vector.h
View File
@@ -1283,6 +1283,12 @@ extern Quat<T> slerp(Quat<T> const &qa, Quat<T> const &qb, T f);
} \
\
tprefix \
inline type distance(tname<type> const &a, tname<type> const &b) \
{ \
return length(a - b); \
} \
\
tprefix \
inline tname<type> fract(tname<type> const &a) \
{ \
tname<type> ret; \
Write
Preview
Loading…
Cancel
Save