UnitExtensions
using Autodesk.DesignScript.Runtime;
using System;
namespace DynamoUnits
{
    [SupressImportIntoVM]
    public static class UnitExtensions
    {
        public static bool AlmostEquals(this double double1, double double2, double precision)
        {
            return Math.Abs(double1 - double2) <= precision;
        }
        public static Length ToLength(this double value)
        {
            return new Length(value);
        }
        public static Area ToArea(this double value)
        {
            return new Area(value);
        }
        public static Volume ToVolume(this double value)
        {
            return new Volume(value);
        }
    }
}