PHP Класс WPDKMath

Автор: =undo= ([email protected])
Наследование: extends WPDKObject
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$__version string Override version

Открытые методы

Метод Описание
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

Описание методов

bytes() публичный статический Метод

Return the string value (byte) well formatted.
С версии: 1.6.1
public static bytes ( integer $value, integer $precision = 2 ) : string
$value integer The bytes value.
$precision integer Optional. Precision after comma.
Результат string

isInfinity() публичный статический Метод

Return TRUE if $value is equal to INF (php) or WPDKMath::INFINITY
С версии: 1.2.0
public static isInfinity ( float | string $value ) : boolean
$value float | string Value to check.
Результат boolean

isPercentage() публичный статический Метод

Return true if the string $value in input params over with %
public static isPercentage ( string $value ) : boolean
$value string String value to check
Результат boolean

number() публичный статический Метод

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.
Результат integer | float

rModulus() публичный статический Метод

Mimic the math function modules like Ruby, Python & TLC
Автор: =stid= ([email protected])
public static rModulus ( number $a, number $n ) : integer
$a number Number a
$n number Module b of a
Результат integer

Описание свойств

$__version публичное свойство

Override version
public string $__version
Результат string