[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/var/www/se3/includes/library/HTMLPurifier/ -> UnitConverter.php (summary)

(no description)

File Size: 307 lines (10 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

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
CSS.

__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.

param: HTMLPurifier_Length $length
param: string $to_unit
return: HTMLPurifier_Length|bool

getSigFigs($n)   X-Ref
Returns the number of significant figures in a string number.

param: string $n Decimal number
return: int number of sigfigs

add($s1, $s2, $scale)   X-Ref
Adds two numbers, using arbitrary precision when available.

param: string $s1
param: string $s2
param: int $scale
return: string

mul($s1, $s2, $scale)   X-Ref
Multiples two numbers, using arbitrary precision when available.

param: string $s1
param: string $s2
param: int $scale
return: string

div($s1, $s2, $scale)   X-Ref
Divides two numbers, using arbitrary precision when available.

param: string $s1
param: string $s2
param: int $scale
return: string

round($n, $sigfigs)   X-Ref
Rounds a number according to the number of sigfigs it should have,
using arbitrary precision when available.

param: float $n
param: int $sigfigs
return: string

scale($r, $scale)   X-Ref
Scales a float to $scale digits right of decimal point, like BCMath.

param: float $r
param: int $scale
return: string



Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1