POV-Ray : Newsgroups : povray.general : Field of View : Re: Field of View Server Time
7 Aug 2024 17:29:43 EDT (-0400)
  Re: Field of View  
From: Vadim Sytnikov
Date: 5 Aug 2001 20:37:53
Message: <3b6de6e1@news.povray.org>
"more stuff to parse" -- how is that?

Chris Huff <chr### [at] maccom> wrote in message
news:chr### [at] netplexaussieorg...
> In article <3b6de1fb@news.povray.org>,
>  "Vadim Sytnikov" <syt### [at] rucom> wrote:
>
> > Using pow() in this context is a bad idea. Simple
> > multiplication (e.g. len3*len3) will do the trick while
> > being more efficient. Not by far due to the huge
> > parsing overhead, but...
>
> Actually, len3*len3 might be slower...more stuff to parse, and the time
> it takes to call the C pow() function is insignificant compared to the
> time it takes to parse POV code. But speed is very unlikely to be of any
> concern here, readability is better, try this:
> #macro Sqr(V) (V*V) #end
>
> Sqr(Len3)
>
>
> BTW, it is a good idea to always include at least one capital letter in
> your macro or variable identifiers...what if some future version of POV
> added len1, len2, or vangle() keywords? This code would simply fail.
>
> --
> Christopher James Huff - chr### [at] maccom,
http://homepage.mac.com/chrishuff/
> TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
>
> <><


Post a reply to this message

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