POV-Ray : Newsgroups : povray.newusers : single point on spline and a vector: comparison : Re: single point on spline and a vector: comparison Server Time
29 Jul 2024 04:18:30 EDT (-0400)
  Re: single point on spline and a vector: comparison  
From: Warp
Date: 3 Nov 2006 07:11:07
Message: <454b31db@news.povray.org>
Slime <fak### [at] emailaddress> wrote:
> > #if (A.x-B.x<Threshold &
> >       A.y-B.y<Threshold &
> >       A.z-B.z<Threshold)

> A simpler (though slower) option is

> #if ( vlength(A-B) < Threshold )

  Slower?-o

  There's much less to parse there. POV-Ray will spend 99% of the time
parsing that expression and 1% of the time calculating its result. You
do the math on which option is faster.

-- 
                                                          - Warp


Post a reply to this message

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