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

gw.util.science.FrequencyUnit.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 FrequencyUnit extends AbstractQuotientUnit {
  final static var CACHE: UnitCache = new UnitCache()

  public static var BASE: FrequencyUnit = get( Radian, Second )
  public static var Hertz: FrequencyUnit = get( Turn, Second, 1, "Hertz", "Hz" )
  public static var RPM: FrequencyUnit = get( Turn, Minute, 1, "RPM", "rpm" )

  static function get( angleUnit: AngleUnit, timeUnit: TimeUnit, factor: Rational = null, name: String = null, symbol: String = null ) : FrequencyUnit {
    var unit = new FrequencyUnit( angleUnit, timeUnit, factor, name, symbol )
    return CACHE.get( unit )
  }

  private construct( angleUnit: AngleUnit, timeUnit: TimeUnit, factor: Rational = null, name: String = null, symbol: String = null ) {
    super( angleUnit, timeUnit, factor, name, symbol )
  }
  
  property get AngleUnit() : AngleUnit {
    return LeftUnit 
  }
  property get TimeUnit() : TimeUnit {
    return RightUnit 
  } 
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy