Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Math/Math.h
- Revision:
- 0:01829868570e
diff -r 000000000000 -r 01829868570e Math/Math.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Math/Math.h Sat Jan 03 18:48:11 2015 +0000
@@ -0,0 +1,12 @@
+#include "Fix16.h"
+#include "Vector3d.h"
+
+#ifndef __MATH_H__
+#define __MATH_H__
+
+template <typename T> int sgn(T val)
+{
+ return (T(0) < val) - (val < T(0));
+}
+
+#endif //__MATH_H__
\ No newline at end of file