Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"new" rounding function.
#1
Code:
FUNCTION round# (num AS DOUBLE, dp AS INTEGER)
DIM exp1 AS LONG, num2 AS LONG
exp1 = (10 ^ dp): num2 = num * exp1: round# = (INT(num2)) / exp1
END FUNCTION

How about this for a rounding function as a replacement to the original FAQ rounding function?
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Messages In This Thread
"new" rounding function. - by Agamemnus - 01-30-2004, 12:06 AM
"new" rounding function. - by oracle - 01-30-2004, 05:20 AM
"new" rounding function. - by Moneo - 02-01-2004, 05:27 AM
"new" rounding function. - by Agamemnus - 02-01-2004, 08:54 PM
"new" rounding function. - by Plasma - 02-01-2004, 11:08 PM
"new" rounding function. - by Agamemnus - 02-02-2004, 01:53 AM
"new" rounding function. - by Moneo - 02-02-2004, 09:02 AM
"new" rounding function. - by Agamemnus - 02-02-2004, 09:35 AM
"new" rounding function. - by Moneo - 02-04-2004, 09:48 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)