RoundUp
Result# = RoundUp(Value#)
 
Parameters:

    Value#=Float value that will be rounded
Returns:

    Result#
 

      Rounds a float value up to the next whole number.



Mini Tutorial:


      Showing the difference between RoundUp and RoundDown


  
; Two float values
  Value1# = 123.99
  Value2# = 33.1
  
; Display Value1# Rounded Up & Down
  Print RoundUp(Value1#)
  Print RoundDown(Value1#)
  
; Display Value2# Rounded Up & Down
  Print RoundUp(Value2#)
  Print RoundDown(Value2#)
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  
  



This example would output.

  
  124.0
  123.0
  34.0
  33.0
  






 
Related Info: Ceil | Floor | Int | RoundDown :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com