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.
Diff: Ball/Ball.cpp
- Revision:
- 10:40c77d69e83c
- Parent:
- 9:ce0a12fb205b
- Child:
- 11:2cf0d4ce8677
diff -r ce0a12fb205b -r 40c77d69e83c Ball/Ball.cpp
--- a/Ball/Ball.cpp Wed Apr 10 12:54:56 2019 +0000
+++ b/Ball/Ball.cpp Thu Apr 11 08:08:52 2019 +0000
@@ -43,6 +43,11 @@
return accel;
}
+int Ball::get_radius(){
+ int radius = _radius;
+ return radius;
+}
+
void Ball::set_velocity(Vector2D vel){
_velocity.x = vel.x;
_velocity.y = vel.y;
@@ -51,4 +56,8 @@
void Ball::set_position(Vector2D pos){
_x = pos.x;
_y = pos.y;
+}
+
+void Ball::set_radius(int radius){
+ _radius = radius;
}
\ No newline at end of file