예제 #1
0
 public ScaleBuilder(UnitConfiguration config, UnitMeta rootUnit)
 {
     this.config   = config;
     precedingUnit = rootUnit;
     if (rootUnit.PhysicalUnit.IsDimensionless())
     {
         throw new InvalidOperationException("The unit you start with should be associated with a physical unit to start a scale.");
     }
 }
예제 #2
0
 internal UnitConfiguration()
 {
     UnitSystem        = this;
     _defaultPrecision = 10;
 }
예제 #3
0
 internal UnitMeta(Unit unit, UnitConfiguration config)
 {
     this.unit   = unit;
     this.config = config;
     config.UnitGraph.AddUnit(unit);
 }