Difference between revisions of "Floor"

From Mesham
Jump to navigationJump to search
(Created page with '== Overview == This floor[n] function will find the largest integer less than or equal to ''n''. * '''Pass:''' A double to find floor of * '''Returns:''' An integer representing…')
 
m (4 revisions imported)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
This floor[n] function will find the largest integer less than or equal to ''n''.
+
This floor(d) function will find the largest integer less than or equal to ''d''.
  
* '''Pass:''' A double to find floor of
+
* '''Pass:''' A [[Double]] to find floor of
* '''Returns:''' An integer representing the floor
+
* '''Returns:''' An [[Int]] representing the floor
  
 
== Example ==
 
== Example ==
  
  var a:=floor[10.5];
+
  #include <maths>
var y;
+
y:=floor[a];
+
function void main() {
 +
    var a:=floor(10.5);
 +
    var y:=floor(a);
 +
};
 +
 
 +
''Since: Version 0.41b''
  
 
[[Category:Function Library]]
 
[[Category:Function Library]]
 
[[Category:Maths Functions]]
 
[[Category:Maths Functions]]

Latest revision as of 15:44, 15 April 2019

Overview

This floor(d) function will find the largest integer less than or equal to d.

  • Pass: A Double to find floor of
  • Returns: An Int representing the floor

Example

#include <maths>

function void main() {
   var a:=floor(10.5);
   var y:=floor(a);
};

Since: Version 0.41b