public static Unit FromPixels(double pixels, UnitType type) { return(new Unit(Unit.ConvertToUnits(pixels, type), type)); }
public Unit(double value, UnitType type) { _type = type; _value = Unit.ConvertToUnits((double)value, type); }
static Unit() { Unit.Empty = new Unit(); _defaultType = UnitType.Inch; }