mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 03:46:50 +01:00
Added erf to Math.
This commit is contained in:
parent
e80dfcee2e
commit
25e57a4268
@ -1652,6 +1652,7 @@ void _Math::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("log10", "x"), &_Math::log10);
|
||||
ClassDB::bind_method(D_METHOD("log2", "x"), &_Math::log2);
|
||||
ClassDB::bind_method(D_METHOD("exp", "x"), &_Math::exp);
|
||||
ClassDB::bind_method(D_METHOD("erf", "x"), &_Math::erf);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("is_nan", "val"), &_Math::is_nan);
|
||||
ClassDB::bind_method(D_METHOD("is_inf", "val"), &_Math::is_inf);
|
||||
|
@ -530,6 +530,10 @@ public:
|
||||
return Math::exp(p_x);
|
||||
}
|
||||
|
||||
_ALWAYS_INLINE_ real_t erf(real_t p_x) {
|
||||
return Math::erf(p_x);
|
||||
}
|
||||
|
||||
_ALWAYS_INLINE_ bool is_nan(real_t p_val) {
|
||||
return Math::is_nan(p_val);
|
||||
}
|
||||
|
@ -117,6 +117,9 @@ public:
|
||||
static _ALWAYS_INLINE_ double exp(double p_x) { return ::exp(p_x); }
|
||||
static _ALWAYS_INLINE_ float exp(float p_x) { return ::expf(p_x); }
|
||||
|
||||
static _ALWAYS_INLINE_ double erf(double p_x) { return ::erf(p_x); }
|
||||
static _ALWAYS_INLINE_ float erf(float p_x) { return ::erff(p_x); }
|
||||
|
||||
// can save typing static_cast<float>
|
||||
inline static float divf(const float a, const float b) { return a / b; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user