// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.

// THIS FILE WAS AUTO-GENERATED BY ./wpiunits/generate_units.py. DO NOT MODIFY

package org.wpilib.units.measure;

import static org.wpilib.units.Units.*;
import org.wpilib.units.*;

@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
   * {@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
   * @param unit the unit of the measurement
   * @return a measurement object
   */
  public static  AngularAcceleration ofRelativeUnits(double magnitude, AngularAccelerationUnit unit) {
    return new AngularAcceleration(magnitude, unit.toBaseUnits(magnitude), unit);
  }

  /**
   * 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 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
   */
  public static  AngularAcceleration ofBaseUnits(double baseUnitMagnitude, AngularAccelerationUnit unit) {
    return new AngularAcceleration(unit.fromBaseUnits(baseUnitMagnitude), baseUnitMagnitude, unit);
  }

  @Override
  public AngularAccelerationUnit baseUnit() { return (AngularAccelerationUnit) unit().getBaseUnit(); }

  @Override
  public double in(AngularAccelerationUnit unit) {
    return unit.fromBaseUnits(baseUnitMagnitude());
  }

  @Override
  @SuppressWarnings("rawtypes")
  public boolean equals(Object object) {
    return object instanceof AngularAcceleration m && isEquivalent(m);
  }

  @Override
  public AngularAcceleration unaryMinus() {
    return (AngularAcceleration) unit().ofBaseUnits(0 - baseUnitMagnitude());
  }

  @Override
  public AngularAcceleration plus(Measure<? extends AngularAccelerationUnit> other) {
    return (AngularAcceleration) unit().ofBaseUnits(baseUnitMagnitude() + other.baseUnitMagnitude());
  }

  @Override
  public AngularAcceleration minus(Measure<? extends AngularAccelerationUnit> other) {
    return (AngularAcceleration) unit().ofBaseUnits(baseUnitMagnitude() - other.baseUnitMagnitude());
  }

  @Override
  public AngularAcceleration times(double multiplier) {
    return (AngularAcceleration) unit().ofBaseUnits(baseUnitMagnitude() * multiplier);
  }

  @Override
  public AngularAcceleration div(double divisor) {
    return (AngularAcceleration) unit().ofBaseUnits(baseUnitMagnitude() / divisor);
  }


  @Override
  public Mult<AngularAccelerationUnit, AccelerationUnit<?>> times(Acceleration<?> multiplier) {
    return (Mult<AngularAccelerationUnit, AccelerationUnit<?>>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, AccelerationUnit<?>> div(Acceleration<?> divisor) {
    return (Per<AngularAccelerationUnit, AccelerationUnit<?>>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, AccelerationUnit<?>> per(AccelerationUnit<?> divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, AngleUnit> times(Angle multiplier) {
    return (Mult<AngularAccelerationUnit, AngleUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, AngleUnit> div(Angle divisor) {
    return (Per<AngularAccelerationUnit, AngleUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, AngleUnit> per(AngleUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, AngularAccelerationUnit> times(AngularAcceleration multiplier) {
    return (Mult<AngularAccelerationUnit, AngularAccelerationUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Dimensionless div(AngularAcceleration divisor) {
    return Value.of(baseUnitMagnitude() / divisor.baseUnitMagnitude());
  }

  @Override
  public Dimensionless per(AngularAccelerationUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, AngularMomentumUnit> times(AngularMomentum multiplier) {
    return (Mult<AngularAccelerationUnit, AngularMomentumUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, AngularMomentumUnit> div(AngularMomentum divisor) {
    return (Per<AngularAccelerationUnit, AngularMomentumUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, AngularMomentumUnit> per(AngularMomentumUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, AngularVelocityUnit> times(AngularVelocity multiplier) {
    return (Mult<AngularAccelerationUnit, AngularVelocityUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, AngularVelocityUnit> div(AngularVelocity divisor) {
    return (Per<AngularAccelerationUnit, AngularVelocityUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, AngularVelocityUnit> per(AngularVelocityUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, CurrentUnit> times(Current multiplier) {
    return (Mult<AngularAccelerationUnit, CurrentUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, CurrentUnit> div(Current divisor) {
    return (Per<AngularAccelerationUnit, CurrentUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, CurrentUnit> per(CurrentUnit divisorUnit) {
    return div(divisorUnit.one());
  }

  @Override
  public AngularAcceleration div(Dimensionless divisor) {
    return (AngularAcceleration) RadiansPerSecondPerSecond.of(baseUnitMagnitude() / divisor.baseUnitMagnitude());
  }

  @Override
  public AngularAcceleration times(Dimensionless multiplier) {
    return (AngularAcceleration) RadiansPerSecondPerSecond.of(baseUnitMagnitude() * multiplier.baseUnitMagnitude());
  }


  @Override
  public Mult<AngularAccelerationUnit, DistanceUnit> times(Distance multiplier) {
    return (Mult<AngularAccelerationUnit, DistanceUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, DistanceUnit> div(Distance divisor) {
    return (Per<AngularAccelerationUnit, DistanceUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, DistanceUnit> per(DistanceUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, EnergyUnit> times(Energy multiplier) {
    return (Mult<AngularAccelerationUnit, EnergyUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, EnergyUnit> div(Energy divisor) {
    return (Per<AngularAccelerationUnit, EnergyUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, EnergyUnit> per(EnergyUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, ForceUnit> times(Force multiplier) {
    return (Mult<AngularAccelerationUnit, ForceUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, ForceUnit> div(Force divisor) {
    return (Per<AngularAccelerationUnit, ForceUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, ForceUnit> per(ForceUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, FrequencyUnit> times(Frequency multiplier) {
    return (Mult<AngularAccelerationUnit, FrequencyUnit>) Measure.super.times(multiplier);
  }

  @Override
  public AngularVelocity div(Frequency divisor) {
    return RadiansPerSecond.of(baseUnitMagnitude() / divisor.baseUnitMagnitude());
  }

  @Override
  public AngularVelocity per(FrequencyUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, LinearAccelerationUnit> times(LinearAcceleration multiplier) {
    return (Mult<AngularAccelerationUnit, LinearAccelerationUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, LinearAccelerationUnit> div(LinearAcceleration divisor) {
    return (Per<AngularAccelerationUnit, LinearAccelerationUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, LinearAccelerationUnit> per(LinearAccelerationUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, LinearMomentumUnit> times(LinearMomentum multiplier) {
    return (Mult<AngularAccelerationUnit, LinearMomentumUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, LinearMomentumUnit> div(LinearMomentum divisor) {
    return (Per<AngularAccelerationUnit, LinearMomentumUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, LinearMomentumUnit> per(LinearMomentumUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, LinearVelocityUnit> times(LinearVelocity multiplier) {
    return (Mult<AngularAccelerationUnit, LinearVelocityUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, LinearVelocityUnit> div(LinearVelocity divisor) {
    return (Per<AngularAccelerationUnit, LinearVelocityUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, LinearVelocityUnit> per(LinearVelocityUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, MassUnit> times(Mass multiplier) {
    return (Mult<AngularAccelerationUnit, MassUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, MassUnit> div(Mass divisor) {
    return (Per<AngularAccelerationUnit, MassUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, MassUnit> per(MassUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, MomentOfInertiaUnit> times(MomentOfInertia multiplier) {
    return (Mult<AngularAccelerationUnit, MomentOfInertiaUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, MomentOfInertiaUnit> div(MomentOfInertia divisor) {
    return (Per<AngularAccelerationUnit, MomentOfInertiaUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, MomentOfInertiaUnit> per(MomentOfInertiaUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, MultUnit<?, ?>> times(Mult<?, ?> multiplier) {
    return (Mult<AngularAccelerationUnit, MultUnit<?, ?>>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, MultUnit<?, ?>> div(Mult<?, ?> divisor) {
    return (Per<AngularAccelerationUnit, MultUnit<?, ?>>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, MultUnit<?, ?>> per(MultUnit<?, ?> divisorUnit) {
    return div(divisorUnit.ofNative(1));
  }


  @Override
  public Mult<AngularAccelerationUnit, PerUnit<?, ?>> times(Per<?, ?> multiplier) {
    return (Mult<AngularAccelerationUnit, PerUnit<?, ?>>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, PerUnit<?, ?>> div(Per<?, ?> divisor) {
    return (Per<AngularAccelerationUnit, PerUnit<?, ?>>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, PerUnit<?, ?>> per(PerUnit<?, ?> divisorUnit) {
    return div(divisorUnit.ofNative(1));
  }


  @Override
  public Mult<AngularAccelerationUnit, PowerUnit> times(Power multiplier) {
    return (Mult<AngularAccelerationUnit, PowerUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, PowerUnit> div(Power divisor) {
    return (Per<AngularAccelerationUnit, PowerUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, PowerUnit> per(PowerUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, ResistanceUnit> times(Resistance multiplier) {
    return (Mult<AngularAccelerationUnit, ResistanceUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, ResistanceUnit> div(Resistance divisor) {
    return (Per<AngularAccelerationUnit, ResistanceUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, ResistanceUnit> per(ResistanceUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, TemperatureUnit> times(Temperature multiplier) {
    return (Mult<AngularAccelerationUnit, TemperatureUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, TemperatureUnit> div(Temperature divisor) {
    return (Per<AngularAccelerationUnit, TemperatureUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, TemperatureUnit> per(TemperatureUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public AngularVelocity times(Time multiplier) {
    return RadiansPerSecond.of(baseUnitMagnitude() * multiplier.baseUnitMagnitude());
  }

  @Override
  public Velocity<AngularAccelerationUnit> div(Time divisor) {
    return VelocityUnit.combine(unit(), divisor.unit()).ofBaseUnits(baseUnitMagnitude() / divisor.baseUnitMagnitude());
  }

  @Override
  public Velocity<AngularAccelerationUnit> per(TimeUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, TorqueUnit> times(Torque multiplier) {
    return (Mult<AngularAccelerationUnit, TorqueUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, TorqueUnit> div(Torque divisor) {
    return (Per<AngularAccelerationUnit, TorqueUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, TorqueUnit> per(TorqueUnit divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, VelocityUnit<?>> times(Velocity<?> multiplier) {
    return (Mult<AngularAccelerationUnit, VelocityUnit<?>>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, VelocityUnit<?>> div(Velocity<?> divisor) {
    return (Per<AngularAccelerationUnit, VelocityUnit<?>>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, VelocityUnit<?>> per(VelocityUnit<?> divisorUnit) {
    return div(divisorUnit.one());
  }


  @Override
  public Mult<AngularAccelerationUnit, VoltageUnit> times(Voltage multiplier) {
    return (Mult<AngularAccelerationUnit, VoltageUnit>) Measure.super.times(multiplier);
  }

  @Override
  public Per<AngularAccelerationUnit, VoltageUnit> div(Voltage divisor) {
    return (Per<AngularAccelerationUnit, VoltageUnit>) Measure.super.div(divisor);
  }

  @Override
  public Per<AngularAccelerationUnit, VoltageUnit> per(VoltageUnit divisorUnit) {
    return div(divisorUnit.one());
  }

}
