UnitSystem inplementation started, Calculation started

This commit is contained in:
NickAppLab
2022-08-26 01:49:22 +05:00
parent e73702d133
commit 51748407e8
29 changed files with 252 additions and 290 deletions

View File

@@ -0,0 +1,29 @@
using System;
using StructureHelper.UnitSystem.Enums;
using StructureHelper.UnitSystem.Systems;
namespace StructureHelper.UnitSystem
{
internal class SystemSi : IUnitSystem
{
public SystemSi()
{
LengthUnits = new Tuple<Length, MultiplyPrefix>(Length.M, MultiplyPrefix.m);
}
public string Name => "СИ";
public Tuple<Force, MultiplyPrefix> ForceUnits { get; }
public Tuple<Pressure, MultiplyPrefix> PressureUnits { get; }
public Tuple<Length, MultiplyPrefix> LengthUnits { get; }
public double ConvertLength(double length)
{
switch (LengthUnits.Item2)
{
case MultiplyPrefix.m:
return length / 1000;
default:
throw new ArgumentOutOfRangeException();
}
}
}
}