Add fix16_sq() inline function as a shorthand to square values

This commit is contained in:
Petteri.Aimonen 2012-08-05 16:11:40 +00:00
parent 85204f4a28
commit 40ef134f4d
1 changed files with 4 additions and 1 deletions

View File

@ -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.
*/