Exemplo n.º 1
0
 public Conversion Find(Unit u)
 {
     Metric m = new Metric(u);
     return Find(m);
 }
Exemplo n.º 2
0
 public Quantity(Exponential value, Unit unit)
 {
     this.Value = value;
     this.Metric = new Metric(unit);
 }
Exemplo n.º 3
0
 public Quantity(Exponential value, Prefix prefix, Unit unit)
 {
     this.Value = value;
     this.Metric = new Metric(prefix, unit);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Adds a unit to the system
 /// </summary>
 /// <param name="name">The name of the unit (for example 'Newton')</param>
 /// <param name="symbol">The symbol for the unit ('N')</param>
 /// <param name="dimension">If the unit is a fundamental unit, the dimension that the unit is expressed in (A meter would be in dimension length)</param>
 /// <returns></returns>
 public Unit AddUnit(string name, string symbol, string dimension = null)
 {
     Unit u = new Unit(name, symbol, dimension);
     Metrics.Units.Add(u);
     return u;
 }