Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 138 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Ceiling:: (6 methods):
  ceiling()
  math()
  precise()
  ceilingMathTest()
  argumentsOk()
  floorCheck1Arg()


Class: Ceiling  - X-Ref

ceiling($number, $significance = null)   X-Ref
CEILING.

Returns number rounded up, away from zero, to the nearest multiple of significance.
For example, if you want to avoid using pennies in your prices and your product is
priced at $4.42, use the formula =CEILING(4.42,0.05) to round prices up to the
nearest nickel.

Excel Function:
CEILING(number[,significance])

return: float|string Rounded Number, or a string containing an error
param: float $number the number you want the ceiling
param: float $significance the multiple to which you want to round

math($number, $significance = null, $mode = 0)   X-Ref
CEILING.MATH.

Round a number down to the nearest integer or to the nearest multiple of significance.

Excel Function:
CEILING.MATH(number[,significance[,mode]])

return: float|string Rounded Number, or a string containing an error
param: mixed $number Number to round
param: mixed $significance Significance
param: int $mode direction to round negative numbers

precise($number, $significance = 1)   X-Ref
CEILING.PRECISE.

Rounds number up, away from zero, to the nearest multiple of significance.

Excel Function:
CEILING.PRECISE(number[,significance])

return: float|string Rounded Number, or a string containing an error
param: mixed $number the number you want to round
param: float $significance the multiple to which you want to round

ceilingMathTest(float $significance, float $number, int $mode)   X-Ref
Let CEILINGMATH complexity pass Scrutinizer.


argumentsOk(float $number, float $significance)   X-Ref
Avoid Scrutinizer problems concerning complexity.

return: float|string

floorCheck1Arg()   X-Ref
No description