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

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

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

final class ResistanceUnit extends AbstractQuotientUnit {
  final static var CACHE: UnitCache = new UnitCache()

  public static var ohm: ResistanceUnit = get( PotentialUnit.BASE, CurrentUnit.BASE, 1, "Ohm", "Ω" )

  public static var BASE: ResistanceUnit = ohm

  static function get( potentialUnit: PotentialUnit, currentUnit: CurrentUnit, factor: Rational = null, name: String = null, symbol: String = null ) : ResistanceUnit {
    var unit = new ResistanceUnit( potentialUnit, currentUnit, factor, name, symbol )
    return CACHE.get( unit )
  }

  private construct( potentialUnit: PotentialUnit, currentUnit: CurrentUnit, factor: Rational = null, name: String = null, symbol: String = null ) {
    super( potentialUnit, currentUnit, factor, name, symbol )
  }

  property get PotentialUnit() : PotentialUnit {
    return LeftUnit 
  }
  property get CurrentUnit() : CurrentUnit {
    return RightUnit 
  }

  function multiply( t: TimeUnit ) : InductanceUnit {
    return InductanceUnit.get( this, t )
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy