API - XOOPS 2.5.11 Beta 2
By monxoops.fr
|
Public Member Functions | |
__construct ($output_precision=4, $internal_precision=10, $force_no_bcmath=false) | |
convert ($length, $to_unit) | |
getSigFigs ($n) | |
Data Fields | |
const | ENGLISH = 1 |
const | METRIC = 2 |
const | DIGITAL = 3 |
Protected Attributes | |
$outputPrecision | |
$internalPrecision | |
Static Protected Attributes | |
static | $units |
Class for converting between different unit-lengths as specified by CSS.
__construct | ( | $output_precision = 4 , |
|
$internal_precision = 10 , |
|||
$force_no_bcmath = false |
|||
) |
convert | ( | $length, | |
$to_unit | |||
) |
Converts a length object of one unit into another unit.
HTMLPurifier_Length | $length | Instance of HTMLPurifier_Length to convert. You must validate() it before passing it here! |
string | $to_unit | Unit to convert to. |
getSigFigs | ( | $n | ) |
Returns the number of significant figures in a string number.
string | $n | Decimal number |
|
protected |
Bcmath precision for internal calculations. @type int
|
protected |
Minimum bcmath precision for output. @type int
|
staticprotected |
Units information array. Units are grouped into measuring systems (English, Metric), and are assigned an integer representing the conversion factor between that unit and the smallest unit in the system. Numeric indexes are actually magical constants that encode conversion data from one system to the next, with a O(n^2) constraint on memory (this is generally not a problem, since the number of measuring systems is small.)
const DIGITAL = 3 |
const ENGLISH = 1 |
const METRIC = 2 |