Mercurial > projects > doodle
diff doodle/tk/geometry.d @ 51:0eaf39fda206
First cut at palette class
author | daveb |
---|---|
date | Wed, 04 Aug 2010 16:36:32 +0930 |
parents | 1b4c9ba58673 |
children | 6c3993f4c3eb |
line wrap: on
line diff
--- a/doodle/tk/geometry.d Wed Aug 04 16:36:07 2010 +0930 +++ b/doodle/tk/geometry.d Wed Aug 04 16:36:32 2010 +0930 @@ -24,15 +24,9 @@ // struct Point { - static immutable Point DEFAULT; - - static this() { - DEFAULT = Point(0.0, 0.0); - } + static immutable Point DEFAULT = Point(0.0, 0.0); this(in double x, in double y) { - assert(!isnan(x)); - assert(!isnan(y)); _x = x; _y = y; } @@ -74,15 +68,9 @@ // struct Vector { - static Vector DEFAULT; - - static this() { - DEFAULT = Vector(0.0, 0.0); - } + static Vector DEFAULT = Vector(0.0, 0.0); this(in double x, in double y) { - assert(!isnan(x)); - assert(!isnan(y)); _x = x; _y = y; } @@ -344,7 +332,7 @@ } private { - Point _point; // Arbitrary point along line + Point _point; // Arbitrary point along line Vector _gradient; } }