Merge branch 'main' into 2027

This commit is contained in:
Peter Johnson
2025-08-09 00:00:53 -07:00
133 changed files with 304 additions and 279 deletions

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record {{ helpers['type_decl'](name) }}(double magnitude, double baseUnitMagnitude, {{ helpers['mtou'](name) }} unit) implements Measure<{{ helpers['mtou'](name) }}> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record {{ helpers['type_decl'](name) }}(double magnitude, double baseUnit
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link {{ name }}Unit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Acceleration<D extends Unit>(double magnitude, double baseUnitMagnitude, AccelerationUnit<D> unit) implements Measure<AccelerationUnit<D>> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Acceleration<D extends Unit>(double magnitude, double baseUnitMagn
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link AccelerationUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Angle(double magnitude, double baseUnitMagnitude, AngleUnit unit) implements Measure<AngleUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Angle(double magnitude, double baseUnitMagnitude, AngleUnit unit)
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link AngleUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record AngularAcceleration(double magnitude, double baseUnitMagnitude, AngularAccelerationUnit unit) implements Measure<AngularAccelerationUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record AngularAcceleration(double magnitude, double baseUnitMagnitude, An
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link AngularAccelerationUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record AngularMomentum(double magnitude, double baseUnitMagnitude, AngularMomentumUnit unit) implements Measure<AngularMomentumUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record AngularMomentum(double magnitude, double baseUnitMagnitude, Angula
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link AngularMomentumUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record AngularVelocity(double magnitude, double baseUnitMagnitude, AngularVelocityUnit unit) implements Measure<AngularVelocityUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record AngularVelocity(double magnitude, double baseUnitMagnitude, Angula
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link AngularVelocityUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Current(double magnitude, double baseUnitMagnitude, CurrentUnit unit) implements Measure<CurrentUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Current(double magnitude, double baseUnitMagnitude, CurrentUnit un
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link CurrentUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Dimensionless(double magnitude, double baseUnitMagnitude, DimensionlessUnit unit) implements Measure<DimensionlessUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Dimensionless(double magnitude, double baseUnitMagnitude, Dimensio
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link DimensionlessUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Distance(double magnitude, double baseUnitMagnitude, DistanceUnit unit) implements Measure<DistanceUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Distance(double magnitude, double baseUnitMagnitude, DistanceUnit
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link DistanceUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Energy(double magnitude, double baseUnitMagnitude, EnergyUnit unit) implements Measure<EnergyUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Energy(double magnitude, double baseUnitMagnitude, EnergyUnit unit
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link EnergyUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Force(double magnitude, double baseUnitMagnitude, ForceUnit unit) implements Measure<ForceUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Force(double magnitude, double baseUnitMagnitude, ForceUnit unit)
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link ForceUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Frequency(double magnitude, double baseUnitMagnitude, FrequencyUnit unit) implements Measure<FrequencyUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Frequency(double magnitude, double baseUnitMagnitude, FrequencyUni
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link FrequencyUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record LinearAcceleration(double magnitude, double baseUnitMagnitude, LinearAccelerationUnit unit) implements Measure<LinearAccelerationUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record LinearAcceleration(double magnitude, double baseUnitMagnitude, Lin
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link LinearAccelerationUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record LinearMomentum(double magnitude, double baseUnitMagnitude, LinearMomentumUnit unit) implements Measure<LinearMomentumUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record LinearMomentum(double magnitude, double baseUnitMagnitude, LinearM
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link LinearMomentumUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record LinearVelocity(double magnitude, double baseUnitMagnitude, LinearVelocityUnit unit) implements Measure<LinearVelocityUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record LinearVelocity(double magnitude, double baseUnitMagnitude, LinearV
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link LinearVelocityUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Mass(double magnitude, double baseUnitMagnitude, MassUnit unit) implements Measure<MassUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Mass(double magnitude, double baseUnitMagnitude, MassUnit unit) im
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link MassUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record MomentOfInertia(double magnitude, double baseUnitMagnitude, MomentOfInertiaUnit unit) implements Measure<MomentOfInertiaUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record MomentOfInertia(double magnitude, double baseUnitMagnitude, Moment
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link MomentOfInertiaUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Mult<A extends Unit, B extends Unit>(double magnitude, double baseUnitMagnitude, MultUnit<A, B> unit) implements Measure<MultUnit<A, B>> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Mult<A extends Unit, B extends Unit>(double magnitude, double base
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link MultUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Per<Dividend extends Unit, Divisor extends Unit>(double magnitude, double baseUnitMagnitude, PerUnit<Dividend, Divisor> unit) implements Measure<PerUnit<Dividend, Divisor>> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Per<Dividend extends Unit, Divisor extends Unit>(double magnitude,
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link PerUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Power(double magnitude, double baseUnitMagnitude, PowerUnit unit) implements Measure<PowerUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Power(double magnitude, double baseUnitMagnitude, PowerUnit unit)
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link PowerUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Resistance(double magnitude, double baseUnitMagnitude, ResistanceUnit unit) implements Measure<ResistanceUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Resistance(double magnitude, double baseUnitMagnitude, ResistanceU
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link ResistanceUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Temperature(double magnitude, double baseUnitMagnitude, TemperatureUnit unit) implements Measure<TemperatureUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Temperature(double magnitude, double baseUnitMagnitude, Temperatur
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link TemperatureUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Time(double magnitude, double baseUnitMagnitude, TimeUnit unit) implements Measure<TimeUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Time(double magnitude, double baseUnitMagnitude, TimeUnit unit) im
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link TimeUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Torque(double magnitude, double baseUnitMagnitude, TorqueUnit unit) implements Measure<TorqueUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Torque(double magnitude, double baseUnitMagnitude, TorqueUnit unit
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link TorqueUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Velocity<D extends Unit>(double magnitude, double baseUnitMagnitude, VelocityUnit<D> unit) implements Measure<VelocityUnit<D>> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Velocity<D extends Unit>(double magnitude, double baseUnitMagnitud
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link VelocityUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/

View File

@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
import static edu.wpi.first.units.Units.*;
import edu.wpi.first.units.*;
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
public record Voltage(double magnitude, double baseUnitMagnitude, VoltageUnit unit) implements Measure<VoltageUnit> {
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
@@ -25,7 +25,7 @@ public record Voltage(double magnitude, double baseUnitMagnitude, VoltageUnit un
/**
* For doing math with measures of a known dimension but an unknown unit. Most users should use
* {@link VoltageUnit#of(double)} on a known unit from {@link Units} instead of calling this method.
* @param magnitude the magnitude of the measurement in terms of the given unit's base unit
* @param baseUnitMagnitude the magnitude of the measurement in terms of the given unit's base unit
* @param unit the unit of the measurement
* @return a measurement object
*/