From 91fb8a59d3032190e6176fed7b4703c419826626 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Wed, 7 Feb 2007 15:13:27 +0000 Subject: - Added simple private __toString method for coordinates and vectors for debugging --- src/structs/coordinate.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/structs/coordinate.php b/src/structs/coordinate.php index 51b0736..7231228 100644 --- a/src/structs/coordinate.php +++ b/src/structs/coordinate.php @@ -53,6 +53,17 @@ class ezcGraphCoordinate extends ezcBaseStruct $this->x = $properties['x']; $this->y = $properties['y']; } + + /** + * Returns simple string representation of coordinate + * + * @return string + * @ignore + */ + public function __toString() + { + return sprintf( '( %.2f, %.2f )', $this->x, $this->y ); + } } ?> -- cgit v1.1