diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-02-07 15:13:27 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-02-07 15:13:27 +0000 |
commit | 91fb8a59d3032190e6176fed7b4703c419826626 (patch) | |
tree | 19d61f6fe81a488df8b1418648c9c79ac908c78d /src/structs | |
parent | 17aac0cff775554c5481c60c12d8b8ff25f32819 (diff) | |
download | zetacomponents-graph-91fb8a59d3032190e6176fed7b4703c419826626.zip zetacomponents-graph-91fb8a59d3032190e6176fed7b4703c419826626.tar.gz |
- Added simple private __toString method for coordinates and vectors for
debugging
Diffstat (limited to 'src/structs')
-rw-r--r-- | src/structs/coordinate.php | 11 |
1 files changed, 11 insertions, 0 deletions
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 ); + } } ?> |