Exemple #1
0
        public void AddUnit(UnitValue <S, T> value, string name, string symbole, string nameSpace)
        {
            var dimension = value.GetDimension();
            S   factor    = value.UnitElement.GetUnitNamePowers().Aggregate(value.Value as IScalar <T>, (scalar, unitNamePower) => scalar.Multiply(GetFactor(unitNamePower))) as S;

            ConstantProvider.Add(ConstantProvider.CreateUnitBaseName(name, symbole, factor, nameSpace, dimension));
        }
Exemple #2
0
 public void AddPrefix(string name, string symbole, string nameSpace, S factor, bool inverted)
 {
     ConstantProvider.Add(ConstantProvider.CreateUnitPrefix(name, symbole, inverted, factor, nameSpace));
 }