Navigation Menu

Skip to content

Commit

Permalink
moar documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pipeep committed Jun 6, 2011
1 parent b78792c commit 62a0e3d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions cbc/CBCJVM/src/cbccore/movement/DriveTrain.java
Expand Up @@ -78,9 +78,12 @@ public void rotateRadians(double radians, double radiansPerSecond) {
/**
* Moves the robot in a piece of a circle.
*
* @param degrees The piece of the circle defined as a change in the
* robot's rotation in degrees
* @param radius The radius of the circle.
* @param radians The piece of the circle defined as a change in the
* robot's rotation in radians. If degrees, the robot
* will move backwards around the circle, otherwise
* positive.
* @param radius The radius of the circle. If negative, the robot
* will move in a CW circle, otherwise a CCW one.
* @param cmps The Centimeters-Per-Second of the center of the robot.
* The maximum value for this is less than maxCmps
* @see #moveCurveRadians
Expand All @@ -94,8 +97,11 @@ public void moveCurveDegrees(double degrees, double radius, double cmps) {
* Moves the robot in a piece of a circle.
*
* @param radians The piece of the circle defined as a change in the
* robot's rotation in radians
* @param radius The radius of the circle.
* robot's rotation in radians. If negative, the robot
* will move backwards around the circle, otherwise
* positive.
* @param radius The radius of the circle. If negative, the robot
* will move in a CW circle, otherwise a CCW one.
* @param cmps The Centimeters-Per-Second of the center of the robot.
* The maximum value for this is less than maxCmps
* @see #moveCurveDegrees
Expand All @@ -104,7 +110,7 @@ public void moveCurveRadians(double radians, double radius, double cmps) {
double halfOffset = plugin.getTrainWidth() * Math.abs(radians) * .5;
double cm = radians * Math.abs(radius);
double leftCm, rightCm;
if(radius > 0) { // CCW
if(radius > 0) { // CCW
leftCm = cm - halfOffset;
rightCm = cm + halfOffset;
} else { // CW
Expand Down

0 comments on commit 62a0e3d

Please sign in to comment.