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

gw.util.science.Inductance.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 Inductance extends AbstractMeasure {
  construct( value : Rational, unit: InductanceUnit, displayUnit: InductanceUnit ) {
    super( value, unit, displayUnit, InductanceUnit.BASE )
  }
  construct( value : Rational, unit: InductanceUnit ) {
    this( value, unit, unit )
  }

  function divide( time: Time ) : Resistance {
    return new Resistance( toBaseNumber() / time.toBaseNumber(), ResistanceUnit.BASE, Unit.ResistanceUnit )
  }
  function divide( resistance: Resistance ) : Time {
    return new Time( toBaseNumber() / resistance.toBaseNumber(), TimeUnit.BASE, Unit.TimeUnit )
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy