Rounding in SM
Hi, does anyone know a quick workaround to get rounded numbers from floats?
- Forums:
Who's online
There is currently 1 user and 1 guest online.
Online users
- karuiner
Hi, does anyone know a quick workaround to get rounded numbers from floats?
smoother rounding
set rnd = ( (flt-int(flt)) >= 0.5) ? int(flt)+1 : int(flt)
wasteful I/O option
This seems like an awful waste of resources, but it works:
...
set segm2 = sprintf('%4.0f',segm)
print "bla" {segm2}
data "bla" read {segm3 1.i}
...