Skip to content

Instantly share code, notes, and snippets.

@JohanLarsson
Created November 7, 2014 20:46
Show Gist options
  • Save JohanLarsson/8bc7b016669add2c790e to your computer and use it in GitHub Desktop.
Save JohanLarsson/8bc7b016669add2c790e to your computer and use it in GitHub Desktop.
new Angle\((?!, AngleUnit.Radians)(.*), AngleUnit.Radians\)
Angle.FromRadians($1)
new Angle\((?!, AngleUnit.Degrees)(.*), AngleUnit.Degrees\)
Angle.FromDegrees($1)
new Length\((?!, LengthUnit.MilliMeters)(.*), LengthUnit.MilliMeters\)
Length.FromMillimetres($1)
new Density\((?!, DensityUnit.GramsPerCubicCentiMeters)(.*), DensityUnit.GramsPerCubicCentiMeters\)
Density.FromGramsPerCubicCentimetre($1)
new Volume\((?!, VolumeUnit.CubicCentimeters)(.*), VolumeUnit.CubicCentimeters\)
Volume.FromCubicCentimetres($1)
new Area\((?!, AreaUnit.SquareMilliMeters)(.*), AreaUnit.SquareMilliMeters\)
Area.FromSquareMillimetres($1)
new Mass\((?!, MassUnit.Grams)(.*), MassUnit.Grams\)
Mass.FromGrams($1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment