how to implement vector structs with different number of components without much code duplication?
Robert Clipsham
robert at octarineparrot.com
Fri Mar 12 15:47:03 PST 2010
On 12/03/10 23:20, Trass3r wrote:
> Is there maybe a way to implement commonly needed vector classes Vec2,
> Vec3, Vec4 without having to implement the same basic code over and over
> again?
The following are a few libraries that have already implemented vector
classes/structs for Vec2 .. Vec4, they might give you some ideas should
you decide to roll your own :)
http://team0xf.com:8080/maths/file/tip/Vec.d
http://dsource.org/projects/scrapple/browser/trunk/tools/tools/vector.d
More information about the Digitalmars-d-learn
mailing list