mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
MATH: Added hypotenuse() call
This commit is contained in:
parent
07fbcc26f4
commit
83c8035fbc
@ -163,6 +163,11 @@ inline T deg2rad(T deg) {
|
||||
return deg2rad<T,T>(deg);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline T hypotenuse(T xv, T yv) {
|
||||
return (T)sqrt((double)(xv * xv + yv * yv));
|
||||
}
|
||||
|
||||
} // End of namespace Common
|
||||
|
||||
#endif // COMMON_MATH_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user