(no description)
File Size: | 307 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
HTMLPurifier_UnitConverter:: (8 methods):
__construct()
convert()
getSigFigs()
add()
mul()
div()
round()
scale()
Class: HTMLPurifier_UnitConverter - X-Ref
Class for converting between different unit-lengths as specified by__construct($output_precision = 4, $internal_precision = 10, $force_no_bcmath = false) X-Ref |
Whether or not BCMath is available. |
convert($length, $to_unit) X-Ref |
Converts a length object of one unit into another unit. return: HTMLPurifier_Length|bool param: HTMLPurifier_Length $length param: string $to_unit |
getSigFigs($n) X-Ref |
Returns the number of significant figures in a string number. return: int number of sigfigs param: string $n Decimal number |
add($s1, $s2, $scale) X-Ref |
Adds two numbers, using arbitrary precision when available. return: string param: string $s1 param: string $s2 param: int $scale |
mul($s1, $s2, $scale) X-Ref |
Multiples two numbers, using arbitrary precision when available. return: string param: string $s1 param: string $s2 param: int $scale |
div($s1, $s2, $scale) X-Ref |
Divides two numbers, using arbitrary precision when available. return: string param: string $s1 param: string $s2 param: int $scale |
round($n, $sigfigs) X-Ref |
Rounds a number according to the number of sigfigs it should have, using arbitrary precision when available. return: string param: float $n param: int $sigfigs |
scale($r, $scale) X-Ref |
Scales a float to $scale digits right of decimal point, like BCMath. return: string param: float $r param: int $scale |