From 0d7eaf89e0e6a9dbe32c023ea7566b5242deebaa Mon Sep 17 00:00:00 2001 From: Michael L Smith Date: Wed, 10 Feb 2016 21:53:07 -0800 Subject: [PATCH] Added 'sizes' class with some constants and an inches to milimeters function --- OSCADSharp/OSCADSharp/OSCADSharp.csproj | 1 + OSCADSharp/OSCADSharp/Sizes.cs | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 OSCADSharp/OSCADSharp/Sizes.cs diff --git a/OSCADSharp/OSCADSharp/OSCADSharp.csproj b/OSCADSharp/OSCADSharp/OSCADSharp.csproj index 8688971..0c9db08 100644 --- a/OSCADSharp/OSCADSharp/OSCADSharp.csproj +++ b/OSCADSharp/OSCADSharp/OSCADSharp.csproj @@ -40,6 +40,7 @@ + diff --git a/OSCADSharp/OSCADSharp/Sizes.cs b/OSCADSharp/OSCADSharp/Sizes.cs new file mode 100644 index 0000000..f47c7dd --- /dev/null +++ b/OSCADSharp/OSCADSharp/Sizes.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OSCADSharp +{ + public class Sizes + { + public const double OneInch = 25.4; + public const double HalfInch = OneInch / 2; + public const double QuarterInch = HalfInch / 2; + public const double EigthInch = QuarterInch / 2; + public const double SixteenthInch = EigthInch / 2; + + public double InchesToMilimeters(double inches) + { + return inches * 0.03937008; + } + } +}