Difference between revisions of "Floor"

From Mesham
Jump to navigationJump to search
m
m (4 revisions imported)
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
  
 
  #include <maths>
 
  #include <maths>
  var a:=floor(10.5);
+
   
var y:=floor(a);
+
function void main() {
 +
    var a:=floor(10.5);
 +
    var y:=floor(a);
 +
};
  
 
''Since: Version 0.41b''
 
''Since: Version 0.41b''

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