Skip to content

Commit 012a632

Browse files
author
apmoskevitz
committed
fix using culture correct negative sign in ToArchitecturalString (maybe not important but made consistant with the ToString method
1 parent 9976c79 commit 012a632

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

UnitsNet/CustomCode/Quantities/Length.extra.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,14 @@ int GreatestCommonDivisor(int a, int b)
284284
return inchPart.ToString();
285285
}
286286

287-
//add the sign to the beginning if negative
288-
string? sign = null;
287+
289288
if (isNegative)
290289
{
291-
sign = "-";
290+
//re-negate feet so the output uses a culture correct negative sign.
291+
feet = -feet;
292292
}
293293

294-
return $"{sign}{feet}' - {inchPart}";
294+
return $"{feet}' - {inchPart}";
295295
}
296296
}
297297
}

0 commit comments

Comments
 (0)