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: 195 lines (7 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])

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

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

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

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

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

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