Re: [eigen] Eigen appears to rock. |

[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]

Quoting Konstantin Heil <konst.heil@xxxxxxxxxxxxxxxxxxxxxx>:

Hi!
On Friday 22 August 2008 15:09:54 Gael Guennebaud wrote:

For instance, if I want the mid point m of two Points p1 and p2:
Point m = 0.5*(p1+p2);
would have to be written:
Point m = 0.5 * ((p1-Point::Zero()) + (p2-Point::Zero())) + Point::Zero();
which version is more confusing ?

Wow, this is very complicate. What's about
Point m = p1+0.5*(p2-p1);

`This fits to the geometric immagination. Start on p1 and walk 0.5
``the way from
`p2 to p1. :)

Hm regardless of intuitiveness discussions... it remains that
p1+0.5*(p2-p1)

`is slower than (p1+p2)*0.5 so it would be very unfortunate to require
``our users to do that! Same thing with any approach based on converting
``back and forth between vector and point.
`
Cheers,
Benoit
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.