Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
_Round () issue
#4
Easiest solution I've found for this type of thing -- just write your own Round function:

Code: (Select All)
Print _Pi
For i = 14 To 0 Step -1
    Print Round(_Pi, i)
Next

Function Round## (num As _Float, toDecPlace As _Unsigned _Byte)
    Round = Int(num * 10 ^ toDecPlace + .5) / 10 ^ toDecPlace
End Function

Can easily round to whatever decimal point you want with the above. Smile
Reply


Messages In This Thread
_Round () issue - by dcromley - 05-11-2022, 04:08 AM
RE: _Round () issue - by bplus - 05-11-2022, 05:32 AM
RE: _Round () issue - by aurel - 05-11-2022, 09:08 AM
RE: _Round () issue - by SMcNeill - 05-11-2022, 09:47 AM
RE: _Round () issue - by OldMoses - 05-11-2022, 10:33 AM
RE: _Round () issue - by dcromley - 05-11-2022, 05:17 PM
RE: _Round () issue - by dcromley - 05-13-2022, 12:45 AM
RE: _Round () issue - by bplus - 05-13-2022, 01:08 AM
RE: _Round () issue - by SMcNeill - 05-13-2022, 10:49 AM
RE: _Round () issue - by bplus - 05-13-2022, 01:55 PM
RE: _Round () issue - by TarotRedhand - 05-13-2022, 11:16 AM
RE: _Round () issue - by SMcNeill - 05-13-2022, 12:02 PM
RE: _Round () issue - by TarotRedhand - 05-13-2022, 01:07 PM
RE: _Round () issue - by SMcNeill - 05-13-2022, 01:21 PM
RE: _Round () issue - by SMcNeill - 05-13-2022, 02:09 PM
RE: _Round () issue - by bplus - 05-13-2022, 06:03 PM
RE: _Round () issue - by SMcNeill - 05-13-2022, 06:20 PM
RE: _Round () issue - by dcromley - 05-13-2022, 09:28 PM



Users browsing this thread: 5 Guest(s)