Remove obsolete math polyfills
This commit is contained in:
parent
4ae95e5f7c
commit
1a52e23f08
|
@ -673,32 +673,6 @@ class Functions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// There are a few mathematical functions that aren't available on all versions of PHP for all platforms
|
|
||||||
// These functions aren't available in Windows implementations of PHP prior to version 5.3.0
|
|
||||||
// So we test if they do exist for this version of PHP/operating platform; and if not we create them
|
|
||||||
//
|
|
||||||
if (!function_exists('acosh')) {
|
|
||||||
function acosh($x)
|
|
||||||
{
|
|
||||||
return 2 * log(sqrt(($x + 1) / 2) + sqrt(($x - 1) / 2));
|
|
||||||
} // function acosh()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!function_exists('asinh')) {
|
|
||||||
function asinh($x)
|
|
||||||
{
|
|
||||||
return log($x + sqrt(1 + $x * $x));
|
|
||||||
} // function asinh()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!function_exists('atanh')) {
|
|
||||||
function atanh($x)
|
|
||||||
{
|
|
||||||
return (log(1 + $x) - log(1 - $x)) / 2;
|
|
||||||
} // function atanh()
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Strangely, PHP doesn't have a mb_str_replace multibyte function
|
// Strangely, PHP doesn't have a mb_str_replace multibyte function
|
||||||
// As we'll only ever use this function with UTF-8 characters, we can simply "hard-code" the character set
|
// As we'll only ever use this function with UTF-8 characters, we can simply "hard-code" the character set
|
||||||
|
|
Loading…
Reference in New Issue