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: 166 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Floor:: (8 methods):
  floorCheck1Arg()
  floor()
  math()
  precise()
  argumentsOkPrecise()
  argsOk()
  floorMathTest()
  argumentsOk()


Class: Floor  - X-Ref

floorCheck1Arg()   X-Ref
No description

floor($number, $significance = null)   X-Ref
FLOOR.

Rounds number down, toward zero, to the nearest multiple of significance.

Excel Function:
FLOOR(number[,significance])

return: float|string Rounded Number, or a string containing an error
param: mixed $number Expect float. Number to round
param: mixed $significance Expect float. Significance

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

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

Excel Function:
FLOOR.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: mixed $mode direction to round negative numbers

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

Rounds number down, toward zero, to the nearest multiple of significance.

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

return: float|string Rounded Number, or a string containing an error
param: float $number Number to round
param: float $significance Significance

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

return: float|string

argsOk(float $number, float $significance, int $mode)   X-Ref
Avoid Scrutinizer complexity problems.

return: float|string Rounded Number, or a string containing an error

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


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

return: float|string