WPDK
1.5.0
WordPress Development Kit
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Pages
wpdk-math.php
Go to the documentation of this file.
1
<?php
12
class
WPDKMath
extends
WPDKObject
{
13
19
const
INFINITY
=
'infinity'
;
20
28
public
$__version
=
'1.0.3'
;
29
42
public
static
function
rModulus
( $a, $n )
43
{
44
return
( $a - ( $n * round( $a / $n ) ) );
45
}
46
54
public
static
function
isPercentage
( $value )
55
{
56
return
( substr( trim( $value ), -1, 1 ) ==
'%'
);
57
}
58
70
public
static
function
isInfinity
( $value )
71
{
72
return
( is_infinite( floatval( $value ) ) || ( is_string( $value ) && $value == self::INFINITY ) );
73
}
74
75
}