Changeset 913 for cpp/common/nonstd_math.h
- Timestamp:
- 04/20/20 23:27:35 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/nonstd_math.h
r899 r913 58 58 #endif 59 59 60 61 60 //handling floating point exceptions 62 61 void fpExceptInit(); //call once, before ...Enable/Disable … … 67 66 template <typename Value, typename Linear> Value universal_lerp(Value a,Value b,Linear t) {return a*(1-t)+b*t;} 68 67 68 template <typename T> T linearTransform(T value, T min_in, T max_in, T min_out, T max_out) 69 { 70 return min_out + (value-min_in)*(max_out-min_out)/(max_in-min_in); 71 } 72 69 73 #endif
Note: See TracChangeset
for help on using the changeset viewer.