All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gw.util.science.Acceleration.gs Maven / Gradle / Ivy

There is a newer version: 1.18.2
Show newest version
package gw.util.science

uses gw.util.Rational
uses java.math.RoundingMode
uses java.math.MathContext

final class Acceleration extends AbstractMeasure {
  construct( value : Rational, unit: AccelerationUnit, displayUnit: AccelerationUnit ) {
    super( value, unit, displayUnit, AccelerationUnit.BASE )
  }
  construct( value: Rational, unit: AccelerationUnit ) {
    this( value, unit, unit )
  }
     
  function multiply( mass: Mass ) : Force {
    return new Force( toBaseNumber() * mass.toBaseNumber(), ForceUnit.BASE, ForceUnit.get( mass.Unit, Unit ) )
  }

  function multiply( time: Time ) : Velocity {
    return new Velocity( toBaseNumber() * time.toBaseNumber(), VelocityUnit.BASE, Unit.VelocityUnit )
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy