|
Boost : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-11-06 06:32:17
Val Samko wrote:
> RD> MFC gets the intended use of CPoint/CSize wrong.
>
> RD> In a mathematical sense, a point is a 0-size location in an nD
> RD> coordinate system. In this case, it is a 2D coordinate system, so is
> RD> (x,y). This is used for positioning, e.g. moving the graphics cursor, so
> RD> I call it gui::position. It does not make sense to perform point [+-*/]=
> RD> point since points are locations in a space (how do I add the location
> RD> of my house to the location of Jupiter)?
>
> I do not follow your logic. In mathematics, in Cartesian nD coordinate
> system, a point is represented by a set of distances between that
> point and the centre of coordinates, along each axe. Just like a vector.
> And vectorA + vectorB is a very common operation.
Yes, a point is taken w.r.t. the centre coordinates, but that does not
mean that it behaves like a vector. All that means is that it is
identifying a position in nD space, for example, a button is at (3,4)
from a frame's client area.
If you look up Point at MathWorld
(http://mathworld.wolfram.com/Point.html) there is no reference to
adding two points together, whereas for vectors
(http://mathworld.wolfram.com/Vector.html) there is.
Regards,
Reece
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk