Fixed login
Started building page cleanup Modified code pools Backported layout/blocks/templates 3-step view system Reforged Overview page Moved graphics, added topnav template, fixed number render bug Added BCMath optionnal usage Updated BC Math comparison for capped resources Fixed planet resource production updates Various additions Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
parent
3fd8832b45
commit
f2d4b0f7e2
384 changed files with 2727 additions and 1364 deletions
63
includes/application/code/libraries/Math/Native.php
Normal file
63
includes/application/code/libraries/Math/Native.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
class Math_Native
|
||||
{
|
||||
public function setPrecision($precision)
|
||||
{
|
||||
}
|
||||
|
||||
public function add($a, $b)
|
||||
{
|
||||
return $a + $b;
|
||||
}
|
||||
|
||||
public function mul($a, $b)
|
||||
{
|
||||
return $a * $b;
|
||||
}
|
||||
|
||||
public function sub($a, $b)
|
||||
{
|
||||
return $a - $b;
|
||||
}
|
||||
|
||||
public function div($a, $b)
|
||||
{
|
||||
return $a / $b;
|
||||
}
|
||||
|
||||
public function mod($a, $b)
|
||||
{
|
||||
return $a % $b;
|
||||
}
|
||||
|
||||
public function pow($a, $b)
|
||||
{
|
||||
return pow($a, $b);
|
||||
}
|
||||
|
||||
public function comp($a, $b)
|
||||
{
|
||||
return ($a > $b) ? 1 : (($a < $b) ? -1 : 0);
|
||||
}
|
||||
|
||||
public function ceil($x)
|
||||
{
|
||||
return ceil($x);
|
||||
}
|
||||
|
||||
public function floor($x)
|
||||
{
|
||||
return floor($x);
|
||||
}
|
||||
|
||||
public function round($range = 0)
|
||||
{
|
||||
return round($x, $range);
|
||||
}
|
||||
|
||||
public function render($a)
|
||||
{
|
||||
return number_format($a, 0, ',', '.');
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue