File dsl/standard/StandardMath.class.php
Last commit: Tue Jul 19 00:10:39 2022 +0200 Jan Dankert Fetched from upstream.
1 <?php 2 namespace dsl\standard; 3 4 use dsl\context\BaseScriptableObject; 5 6 class StandardMath extends BaseScriptableObject 7 { 8 public $E = M_EULER; 9 public $PI = M_PI; 10 public $LN2 = M_LN2; 11 public $LN10 = M_LN10; 12 public $SQRT1_2 = M_SQRT1_2; 13 public $SQRT2 = M_SQRT2; 14 15 public function sqrt($x) { return sqrt( $x ); } 16 17 public function abs($x) { return abs($x);} 18 public function neg($x) { return abs($x) * -1; } 19 20 public function acos($x) { return ($x); } 21 public function acosh($x) { return ($x); } 22 public function asin($x) { return ($x); } 23 public function asinh($x) { return ($x); } 24 public function atan($x) { return atan($x); } 25 public function atanh($x) { return atanh($x); } 26 public function atan2($y, $x) { return atan2($y,$x); } 27 public function cbrt($x) { return ($x); } 28 public function cos($x) { return cos($x); } 29 public function cosh($x) { return cosh($x); } 30 public function sin($x) { return sin($x); } 31 public function sinh($x) { return sinh($x); } 32 public function tan($x) { return tan($x); } 33 public function tanh($x) { return tanh($x); } 34 35 public function ceil($x) { return ceil($x); } 36 public function floor($x) { return floor($x); } 37 38 public function exp($x) { return exp($x); } 39 public function expm1($x) { return expm1($x); } 40 public function log($x) { return log($x); } 41 public function log1p($x) { return log($x); } 42 public function log10($x) { return log10($x); } 43 public function max($x,$y) { return max($x,$y); } 44 public function min($x,$y) { return min($x,$y); } 45 public function pow($x,$y) { return pow($x,$y); } 46 public function random() { return rand(); } 47 public function round($x) { return round($x); } 48 }
Downloaddsl/standard/StandardMath.class.php
History Tue, 19 Jul 2022 00:10:39 +0200 Jan Dankert Fetched from upstream. Mon, 27 Jun 2022 00:41:50 +0200 Jan Dankert Fetched from upstream. Mon, 6 Jun 2022 14:06:46 +0200 Jan Dankert First commit after fetching from upstream repo.