diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-07-20 21:54:19 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-07-20 21:54:19 +0800 |
commit | 4cf12a6d223a238ff30f8b334ca91836c7369f88 (patch) | |
tree | a2bf8fa27e5fff8a1b8a75cdb5d835f4e959f145 /indra/llmath/llcalcparser.h | |
parent | 13f24f2419edeefbda8bedab01fad21cb97b7445 (diff) | |
parent | 569d97707459d5f87cb04a0811c0b7eb1b5c2251 (diff) |
Merge branch 'main' into webrtc-voice
Diffstat (limited to 'indra/llmath/llcalcparser.h')
-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 569ae4a498..b40001cf7e 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<float, float, float>(&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<float, float, float>(&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; |