PHP Class WPDKMath

Author: =undo= ([email protected])
Inheritance: extends WPDKObject
Mostra file Open project: wpxtreme/wpdk Class Usage Examples

Public Properties

Property Type Description
$__version string Override version

Public Methods

Method Description
bytes ( integer $value, integer $precision = 2 ) : string Return the string value (byte) well formatted.
isInfinity ( float | string $value ) : boolean Return TRUE if $value is equal to INF (php) or WPDKMath::INFINITY
isPercentage ( string $value ) : boolean Return true if the string $value in input params over with %
number ( string $value ) : integer | float Remove all alfa-char from a string and return number only.
rModulus ( number $a, number $n ) : integer Mimic the math function modules like Ruby, Python & TLC

Method Details

bytes() public static method

Return the string value (byte) well formatted.
Since: 1.6.1
public static bytes ( integer $value, integer $precision = 2 ) : string
$value integer The bytes value.
$precision integer Optional. Precision after comma.
return string

isInfinity() public static method

Return TRUE if $value is equal to INF (php) or WPDKMath::INFINITY
Since: 1.2.0
public static isInfinity ( float | string $value ) : boolean
$value float | string Value to check.
return boolean

isPercentage() public static method

Return true if the string $value in input params over with %
public static isPercentage ( string $value ) : boolean
$value string String value to check
return boolean

number() public static method

Remove all alfa-char from a string and return number only.
public static number ( string $value ) : integer | float
$value string Any string with number inside.
return integer | float

rModulus() public static method

Mimic the math function modules like Ruby, Python & TLC
Author: =stid= ([email protected])
public static rModulus ( number $a, number $n ) : integer
$a number Number a
$n number Module b of a
return integer

Property Details

$__version public_oe property

Override version
public string $__version
return string