POV-Ray : Newsgroups : povray.unofficial.patches : Spline bug: floats converted to vectors : Re: Spline bug: floats converted to vectors Server Time
1 Sep 2024 20:20:56 EDT (-0400)
  Re: Spline bug: floats converted to vectors  
From: Margus Ramst
Date: 3 Dec 2000 09:17:39
Message: <3A2A5676.4CED75F9@peak.edu.ee>
Rune wrote:
> 
> Using MySpline(0).x is not an option, because I use the same macro to handle
> floats and vectors, and I don't want my vectors to be converted to floats.
> 

Well, if I understand the problem correctly, this should avoid converting the
values to float when they shouldn't be (untested!):

#if(MySpline(n).x = MySpline(n).y & MySpline(n).x = MySpline(n).z)
#declare Val = 0 + MySpline(n).x; //float
#else
#declare Val = <0,0,0> + MySpline(n); //vector
#end

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.