summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-02-07 15:13:27 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-02-07 15:13:27 +0000
commit91fb8a59d3032190e6176fed7b4703c419826626 (patch)
tree19d61f6fe81a488df8b1418648c9c79ac908c78d
parent17aac0cff775554c5481c60c12d8b8ff25f32819 (diff)
downloadzetacomponents-graph-91fb8a59d3032190e6176fed7b4703c419826626.zip
zetacomponents-graph-91fb8a59d3032190e6176fed7b4703c419826626.tar.gz
- Added simple private __toString method for coordinates and vectors for
debugging
-rw-r--r--src/structs/coordinate.php11
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 );
+ }
}
?>
OpenPOWER on IntegriCloud