diff options
| -rw-r--r-- | libfixmath/fix16.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libfixmath/fix16.h b/libfixmath/fix16.h index 0767627..1508aaf 100644 --- a/libfixmath/fix16.h +++ b/libfixmath/fix16.h @@ -187,7 +187,10 @@ static inline fix16_t fix16_deg_to_rad(fix16_t degrees) */
extern fix16_t fix16_sqrt(fix16_t inValue) FIXMATH_FUNC_ATTRS;
-
+/*! Returns the square of the given fix16_t.
+*/
+static inline fix16_t fix16_sq(fix16_t x)
+ { return fix16_mul(x, x); }
/*! Returns the exponent (e^) of the given fix16_t.
*/
|
