Patrick Clary / Mbed 2 deprecated WalkingRobot

Dependencies:   CircularBuffer Servo Terminal mbed Radio

Revision:
12:a952bd74d363
Parent:
5:475f67175510
Child:
17:4ec59e8b52a6
--- a/Matrix.cpp	Wed May 15 17:22:22 2013 +0000
+++ b/Matrix.cpp	Tue May 21 04:27:58 2013 +0000
@@ -49,6 +49,13 @@
 
 
 
+void vector3::print(char* buf, unsigned int len)
+{
+    snprintf(buf, len, "%.4f\t%.4f\t%.4f", x, y, z);
+}
+
+
+
 matrix4::matrix4()
 {
     // Initialize as identity matrix
@@ -207,4 +214,17 @@
     result.a34 = (a11*a24*a32 - a11*a22*a34 + a12*a21*a34 - a12*a24*a31 - a14*a21*a32 + a14*a22*a31)*idet;
 
     return result;
-}
\ No newline at end of file
+}
+
+
+
+void matrix4::print(char* buf, unsigned int len)
+{
+    snprintf(buf, len, "%.4f\t%.4f\t%.4f\t%.4f\n"
+                          "%.4f\t%.4f\t%.4f\t%.4f\n"
+                          "%.4f\t%.4f\t%.4f\t%.4f\n"
+                          "0     \t0     \t0     \t1\n",
+            a11, a12, a13, a14,
+            a21, a22, a23, a24,
+            a31, a32, a33, a34);
+}