Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Face/Face.cpp
- Revision:
- 10:07a23afd5088
- Parent:
- 9:5915fc800824
- Child:
- 13:f4de03202477
diff -r 5915fc800824 -r 07a23afd5088 Face/Face.cpp
--- a/Face/Face.cpp Tue Mar 19 10:27:37 2019 +0000
+++ b/Face/Face.cpp Tue Mar 19 12:12:52 2019 +0000
@@ -13,14 +13,12 @@
}*/
}
void Face::setVerticies(double (&PointArray)[4][3]){
- double z;
+ double z = 0;
for(int vertex = 0; vertex < 4; vertex++){
for(int axis = 0; axis < 3; axis++){
verticies[vertex][axis] = PointArray[vertex][axis];
- if(axis == 2){
- z += verticies[vertex][axis];
- }
}
+ z += verticies[vertex][2];
}
avgZ = z/4;
}