\DtApp\ThinkLibrary\helperDecimals

小数管理类

Summary

Methods
Properties
Constants
intval()
round()
ceil()
floor()
judge()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

intval()

intval(  $num) : integer

直接取整,舍弃小数保留整数

Parameters

$num

Returns

integer

round()

round(  $num, integer  $bl) : float

四舍五入取整

Parameters

$num
integer $bl

Returns

float

ceil()

ceil(  $num) : false|float

有小数,就在整数的基础上加一

Parameters

$num

Returns

false|float

floor()

floor(  $num) : false|float

有小数,就取整数位

Parameters

$num

Returns

false|float

judge()

judge(  $num) : boolean

判断是不是小数

Parameters

$num

Returns

boolean