MCPcopy Create free account
hub / github.com/SimHacker/micropolis / absoluteValue

Function absoluteValue

MicropolisCore/src/MicropolisEngine/src/micropolis.h:886–892  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

884 */
885template <typename T>
886static inline T absoluteValue(const T val)
887{
888 if (val < 0) {
889 return -val;
890 }
891 return val;
892}
893
894////////////////////////////////////////////////////////////////////////
895// Macros

Callers 4

getBoatDistanceMethod · 0.85
toolDragMethod · 0.85
getDirMethod · 0.85
getDistanceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected