From 62a0e3d61a3f54718558940561ff2ceb21832a85 Mon Sep 17 00:00:00 2001 From: pipeep Date: Tue, 24 May 2011 13:14:40 -0400 Subject: [PATCH] moar documentation --- .../src/cbccore/movement/DriveTrain.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/cbc/CBCJVM/src/cbccore/movement/DriveTrain.java b/cbc/CBCJVM/src/cbccore/movement/DriveTrain.java index 454248b..eb112fc 100644 --- a/cbc/CBCJVM/src/cbccore/movement/DriveTrain.java +++ b/cbc/CBCJVM/src/cbccore/movement/DriveTrain.java @@ -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 @@ -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 @@ -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