GearRatio
This class implements a gear ratio, providing methods to convert values between the input and output sides of a geared system. It stores both the input-to-output and output-to-input ratios for convenience.
Methods
GearRatio(int inputTeeth, int outputTeeth)
Constructs a GearRatio based on the number of teeth on the input and output gears.
GearRatio(double howManyIn, double howManyOut)
Constructs a GearRatio based on a direct ratio of input to output values.
outputFor(double input)
Calculates the output value given an input value, based on the gear ratio.
inputFor(double output)
Calculates the input value required to achieve a given output value, based on the gear ratio.