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: Map/map.cpp
- Revision:
- 10:b939edd9b87c
- Child:
- 11:0e6a221ad8a9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Map/map.cpp Fri May 10 12:00:30 2019 +0000 @@ -0,0 +1,38 @@ + +#include "map.h" + + +void Map::init() { + + set_player_curvature(0.0f); + + } + +// accessors +float Map::get_player_curvature() { + + return _player_curvature; + + } + +float Map::get_timed_curvature() { + + return _timed_curvature; + + } + +// mutators +void Map::set_player_curvature(float _player_curvature) { + + if(_player_curvature < -1.0f) _player_curvature = -1.0f; + if(_player_curvature > 1.0f) _player_curvature = 1.0f; + + this->_player_curvature = _player_curvature; + + } + +void Map::set_timed_curvature(float _timed_curvature) { + + this->_timed_curvature = _timed_curvature; + + }