fix: preserve legacy p-rec-annot elevation quotient formatting
This commit is contained in:
@@ -6,8 +6,11 @@ public static class LegacyElevationFormatter
|
||||
{
|
||||
public static int RoundModelElevation(double modelZ, double datumOffset)
|
||||
{
|
||||
var increments = Math.Round((modelZ + datumOffset) / 5d, MidpointRounding.AwayFromZero);
|
||||
return checked((int)Math.Round(increments * 5d, MidpointRounding.AwayFromZero));
|
||||
// InsertElevation.BlockJig divides the model-space ordinate by five,
|
||||
// rounds that quotient away from zero, then formats the resulting
|
||||
// integer as a signed metres/millimetres value. It does not multiply
|
||||
// the rounded quotient back by five.
|
||||
return checked((int)Math.Round((modelZ + datumOffset) / 5d, MidpointRounding.AwayFromZero));
|
||||
}
|
||||
|
||||
public static string FormatMillimetres(int millimetres)
|
||||
|
||||
Reference in New Issue
Block a user