Mercurial > projects > doodle
diff tk/geometry.d @ 16:9e63308b749c
* Fix up public/private includes
* Make Mask a struct
author | David Bryant <daveb@acres.com.au> |
---|---|
date | Mon, 13 Jul 2009 16:16:17 +0930 |
parents | 2f79aab4d385 |
children | c643c04e3f5e |
line wrap: on
line diff
--- a/tk/geometry.d Sun Jul 12 13:23:06 2009 +0930 +++ b/tk/geometry.d Mon Jul 13 16:16:17 2009 +0930 @@ -1,8 +1,10 @@ module tk.geometry; -private import std.stdio; -private import std.math; -private import tk.misc; +private { + import std.stdio; + import std.math; + import tk.misc; +} struct Point { static immutable Point DEFAULT; @@ -28,7 +30,7 @@ return Vector(_x - p._x, _y - p._y); } - string toString() const { + string toString() { return std.string.format("(%f, %f)", _x, _y); } @@ -84,7 +86,7 @@ return sqrt(_x * _x + _y * _y); } - string toString() const { + string toString() { return std.string.format("[%f, %f]", _x, _y); } @@ -200,7 +202,7 @@ return _position + _size / 2.0; } - string toString() const { + string toString() { return std.string.format("{%s, %s}", _position, _size); }