POV-Ray : Newsgroups : povray.programming : Vectors in C++ : Re: Vectors in C++ Server Time
6 Oct 2024 15:17:42 EDT (-0400)
  Re: Vectors in C++  
From: Christopher James Huff
Date: 17 Dec 2002 18:04:26
Message: <chrishuff-76FEFC.17593517122002@netplex.aussie.org>
In article <3dff7c63@news.povray.org>, Micha Riser <mri### [at] gmxnet> 
wrote:

> > a += b; a += c;
> > or:
> > (a += b) += c;
> > 
> > No temporaries.
> 
> But you probably wouldn't write it like this when you had the + available.

If I am worried about that I use the "x=" operators. I have written a 
vector class with these operators and I do use it in exactly this way.


> I still think the programmer is more forced to think about the best 
> operation sequence when one has to apply them one by one and cannot just 
> put lengths of forumlas there.

The problem is that he is forced to do so even when it doesn't matter.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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