Skip to content

Commit

Permalink
Clarify comments on ConstraintsPair
Browse files Browse the repository at this point in the history
Co-authored-by: Bernie Conrad <[email protected]>
  • Loading branch information
Mineinjava and Bernstern committed Aug 3, 2024
1 parent 339ffe9 commit 1e414d5
Showing 1 changed file with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -20,31 +20,34 @@

package com.mineinjava.quail.pathing;

/**
* Represents a pair of constraints (max velocity and max acceleration) for use in the path
* follower.
*
* <p>Can be either translational or angular velocity. If angular velocity, units are in radians.
*/
public class ConstraintsPair {

private double velocity;
private double acceleration;
private final double velocity;
private final double acceleration;

/**
* Represents a pair of constraints (max velocity and max acceleration) for use in the path
* follower.
* Constructs a new ConstraintsPair with the specified max velocity and max acceleration.
*
* <p>Can be either translational or angular velocity. If angular velocity, units are in radians.
*
* @param maxVelocity your units/s
* @param maxAcceleration your units/s^2
* @param maxVelocity the maximum velocity in units/s
* @param maxAcceleration the maximum velocity in units/s^2
*/
public ConstraintsPair(double maxVelocity, double maxAcceleration) {
this.velocity = maxVelocity;
this.acceleration = maxAcceleration;
}

/** Returns the constraints' max velocity. */
/** Returns the maximum velocity of the constraints. */
public double getMaxVelocity() {
return velocity;
}

/** Returns the constraints' max acceleration. */
/** Returns the maximum acceleration of the constraints. */
public double getMaxAcceleration() {
return acceleration;
}

0 comments on commit 1e414d5

Please sign in to comment.