aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Fioramonti2018-05-23 19:47:04 -0700
committerThierry Crozat2018-05-28 23:00:53 +0100
commit8d10fbe1bae8da7d248179b334fdaf4093ab7f2a (patch)
treed1f77bbba928f79bcdd4958c59aadc18e6589e28
parent784d2dc282269dba15ba703b5e48c6014be01d56 (diff)
downloadscummvm-rg350-8d10fbe1bae8da7d248179b334fdaf4093ab7f2a.tar.gz
scummvm-rg350-8d10fbe1bae8da7d248179b334fdaf4093ab7f2a.tar.bz2
scummvm-rg350-8d10fbe1bae8da7d248179b334fdaf4093ab7f2a.zip
COMMON: coding convention improvements for degree conversion funcs
Removed whitespace before template keyword. Made template types camel case starting with lowercase.
-rw-r--r--common/math.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/common/math.h b/common/math.h
index a8e07686ff..7b2ec6060e 100644
--- a/common/math.h
+++ b/common/math.h
@@ -110,20 +110,20 @@ inline int intLog2(uint32 v) {
// Convert radians to degrees
// Input and Output type can be different
// Upconvert everything to floats
-template <class inputT, class outputT>
-inline outputT rad2deg(inputT rad) {
- return (outputT)( (float)rad * (float)57.2957795130823); // 180.0/M_PI = 57.2957795130823
+template<class InputT, class OutputT>
+inline OutputT rad2deg(InputT rad) {
+ return (OutputT)( (float)rad * (float)57.2957795130823); // 180.0/M_PI = 57.2957795130823
}
// Handle the case differently when the input type is double
-template <class outputT>
-inline outputT rad2deg(double rad) {
- return (outputT)( rad * 57.2957795130823);
+template<class OutputT>
+inline OutputT rad2deg(double rad) {
+ return (OutputT)( rad * 57.2957795130823);
}
// Convert radians to degrees
// Input and Output type are the same
-template <class T>
+template<class T>
inline T rad2deg(T rad) {
return rad2deg<T,T>(rad);
}
@@ -131,20 +131,20 @@ inline T rad2deg(T rad) {
// Convert degrees to radians
// Input and Output type can be different
// Upconvert everything to floats
-template <class inputT, class outputT>
-inline outputT deg2rad(inputT deg) {
- return (outputT)( (float)deg * (float)0.0174532925199433); // M_PI/180.0 = 0.0174532925199433
+template<class InputT, class OutputT>
+inline OutputT deg2rad(InputT deg) {
+ return (OutputT)( (float)deg * (float)0.0174532925199433); // M_PI/180.0 = 0.0174532925199433
}
// Handle the case differently when the input type is double
-template <class outputT>
-inline outputT deg2rad(double deg) {
- return (outputT)( deg * 0.0174532925199433);
+template<class OutputT>
+inline OutputT deg2rad(double deg) {
+ return (OutputT)( deg * 0.0174532925199433);
}
// Convert degrees to radians
// Input and Output type are the same
-template <class T>
+template<class T>
inline T deg2rad(T deg) {
return deg2rad<T,T>(deg);
}