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

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

  function multiply( current: Current ) : Potential {
    return new Potential( toBaseNumber() * current.toBaseNumber(), PotentialUnit.BASE, Unit.PotentialUnit )
  }
  
  function multiply( time: Time ) : Inductance {
    return new Inductance( toBaseNumber() * time.toBaseNumber(), InductanceUnit.BASE, Unit * time.Unit )
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy