diff options
author | Nicky Dasmijn <nicky.dasmijn@posteo.nl> | 2024-04-05 19:25:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-05 20:25:02 +0300 |
commit | 57d423745fd1d3d0ea6a0c69b869a20c27e27fc5 (patch) | |
tree | f590e086983c7277e4b05fcd54c3eebf6b12f43a /indra/llmath | |
parent | cc8d71c18c124138e76e85e663498d2ee9776b3c (diff) |
Linux viewer (ReleaseOS) resurrection (#1099)
Co-authored-by: AiraYumi <aira.youme@airanyumi.net>
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/llcalcparser.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/llmath/llcalcparser.h b/indra/llmath/llcalcparser.h index dff5bf3af3..663764ce04 100644 --- a/indra/llmath/llcalcparser.h +++ b/indra/llmath/llcalcparser.h @@ -131,14 +131,14 @@ struct LLCalcParser : grammar<LLCalcParser> power = unary_expr[power.value = arg1] >> - *('^' >> assert_syntax(unary_expr[power.value = phoenix::bind(&powf)(power.value, arg1)])) + *('^' >> assert_syntax(unary_expr[power.value = phoenix::bind(&LLCalcParser::_pow)(self, power.value, arg1)])) ; term = power[term.value = arg1] >> *(('*' >> assert_syntax(power[term.value *= arg1])) | ('/' >> assert_syntax(power[term.value /= arg1])) | - ('%' >> assert_syntax(power[term.value = phoenix::bind(&fmodf)(term.value, arg1)])) + ('%' >> assert_syntax(power[term.value = phoenix::bind(&LLCalcParser::_fmod)(self, term.value, arg1)])) ) ; @@ -177,6 +177,8 @@ private: F32 _floor(const F32& a) const { return (F32)llfloor(a); } F32 _ceil(const F32& a) const { return llceil(a); } F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); } + F32 _pow(const F32& a, const F32& b) const { return powf(a, b); } + F32 _fmod(const F32&a, const F32& b) const { return fmodf(a, b); } LLCalc::calc_map_t* mConstants; LLCalc::calc_map_t* mVariables; |