diff options
author | Yilun Lin <yllin@google.com> | 2018-09-13 14:41:51 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-09-26 10:32:47 -0700 |
commit | 56d600bb39433f804db4cc45e2b32fd6523b2316 (patch) | |
tree | f37b3ab42f6328018c8dc715a453b8f46dfc9ece /include/math_util.h | |
parent | 77949dd9fb9fc5de724690895d770b7b31f0b572 (diff) | |
download | chrome-ec-56d600bb39433f804db4cc45e2b32fd6523b2316.tar.gz |
math_util: Support fixed-point sqrtf fp_sqrtf.
TEST=make buildall -j
BUG=b:113364863
BRANCH=None
Change-Id: I63ee741a08e39cf6f234a2131137144c46ae0bbd
Signed-off-by: Yilun Lin <yllin@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1235476
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Yilun Lin <yllin@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'include/math_util.h')
-rw-r--r-- | include/math_util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/math_util.h b/include/math_util.h index 1bcff13525..9e6b73aac7 100644 --- a/include/math_util.h +++ b/include/math_util.h @@ -90,6 +90,11 @@ static inline fp_t fp_abs(fp_t a) return (a >= INT_TO_FP(0) ? a : -a); } +/** + * Square root + */ +fp_t fp_sqrtf(fp_t a); + /* * Fixed point matrix * |