POV-Ray : Newsgroups : povray.advanced-users : Round function : Round function Server Time: 6 Jul 2008 10:08:51 GMT
  Round function  
From: Woody
Date: 13 Nov 2007 17:55:00
Can someone help me,

I am trying to create a round(a,b) function. i.e something to take float a and
round it to b decimal places or round it to the nearest b

I need to be able to use it in an isosurface object as say

isosurface{
function{abs(x-round(x,0))}
}

where round(x,0) rounds to 0 decimal places.

I tried a macro like

#macro round(a,b)
val(str(a,64,b)
#end

pov doesnt handle the promotion properly

is there anyway I can construct a function to achieve the same effect?


Post a reply to this message

Copyright 1991-2004 POV-Team™