commentaart turn

This commit is contained in:
Leen Dereu
2018-03-07 20:07:46 +01:00
parent 2bcda45bb6
commit e9e6d14f0c

View File

@@ -404,16 +404,16 @@ public class Worm {
//=================================================================================== //===================================================================================
/** /**
* turns the worm with the given angle
*
* @param angle * @param angle
* the angle that must be added to the orientation * the angle that must be added to the orientation
*
* @pre the angle to add must be between 0 and 2pi (including 0) * @pre the angle to add must be between 0 and 2pi (including 0)
* |0 <= angle < 2pi * |0 <= angle < 2pi
*
* @post the new orientation is the old orientation plus the given angle * @post the new orientation is the old orientation plus the given angle
* |new.orientation = orientation + angle * |new.getOrientation() = this.getOrientation() + angle
* @post the resulting angle (= the new orientation) must be between 0 and 2pi (including 0) * @post the resulting angle (= the new orientation) must be between 0 and 2pi (including 0)
* |0 <= new.orientation < 2pi * |0 <= new.getOrientation() < 2pi
*/ */
public void turn(double angle) { public void turn(double angle) {
assert 0 <= angle && angle < (2 * Math.PI); assert 0 <= angle && angle < (2 * Math.PI);