Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401]

(no description)

File Size: 167 lines (6 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])

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

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]])

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

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])

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

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