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…')
 
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
Line 7: Line 7:
 
== Example ==
 
== Example ==
  
  var a:=floor[10.5];
+
#include <maths>
  var y;
+
  var a:=floor(10.5);
y:=floor[a];
+
  var y:=floor(a);
  
 
[[Category:Function Library]]
 
[[Category:Function Library]]
 
[[Category:Maths Functions]]
 
[[Category:Maths Functions]]

Revision as of 12:44, 13 January 2013

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 integer representing the floor

Example

#include <maths>
var a:=floor(10.5);
var y:=floor(a);