summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-06-20 16:16:37 +0800
committerErik Kundiman <erik@megapahit.org>2024-06-20 20:52:45 +0800
commitad5dec92bcb7d11e6a48b6ec6a220a49de985351 (patch)
tree3870c4c7f1c9521c6ad40d1cfe1b1d8fc39882ef /indra/llmath
parent16299d3a3631e4c42367cf40410ad6995e585384 (diff)
parenta65bc46b138b89200586b29fe729cbc7b0f0c8c4 (diff)
Merge remote-tracking branch 'secondlife/release/maint-b' into maint-b
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llcalcparser.h6
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;