Michael Smith d8eb02ecc4 + Renamed Sizes class to Inches
+ In progress Bindings clone functionality
2016-03-04 22:36:14 -08:00

50 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OSCADSharp
{
/// <summary>
/// Constants and conversions for units for us imperial-minded folks.
/// </summary>
public class Inches
{
/// <summary>
/// One imperial inch
/// </summary>
public const double One = 25.4;
/// <summary>
/// Half of an imperial inch
/// </summary>
public const double Half = One / 2;
/// <summary>
/// Quarter of an imperial inch
/// </summary>
public const double Quarter = Half / 2;
/// <summary>
/// Eigth of an imperial inch
/// </summary>
public const double Eigth = Quarter / 2;
/// <summary>
/// Sixteenth of an imperial inch
/// </summary>
public const double Sixteenth = Eigth / 2;
/// <summary>
/// Converts inches to millimeters
/// </summary>
/// <param name="inches">Number of inches</param>
/// <returns>Equivalent value in milimeters</returns>
public static double ToMillimeters(double inches)
{
return inches * One;
}
}
}