Points and Vectors in 3D

Caligo iteronvexor at gmail.com
Sat Mar 12 12:51:36 PST 2011


Given everything that D offers, what would be the best way to implement a
Point and a Vector type?  The same (x, y, z) can be used to represent
vectors, but a point represents a position, whereas a vector represents a
direction.  So, would you define two different structs for each? or define
and implement an interface?  a fixed array or POD members?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20110312/86dbeb81/attachment.html>


More information about the Digitalmars-d-learn mailing list