mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[PTRun][UnitConverter]Use capital letters in DegreePrefixer (#34845)
* [Run-UnitConverter] Use capital letters in DegreePrefixer * doc update * Update tests * Remove FeetToFt * trigger checks
This commit is contained in:
@@ -11,7 +11,7 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter
|
||||
{
|
||||
public static class UnitHandler
|
||||
{
|
||||
private static readonly int _roundingFractionalDigits = 4;
|
||||
private static readonly int _roundingSignificantDigits = 4;
|
||||
|
||||
private static readonly QuantityInfo[] _included = new QuantityInfo[]
|
||||
{
|
||||
@@ -72,7 +72,7 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter
|
||||
|
||||
var power = Math.Floor(Math.Log10(Math.Abs(value)));
|
||||
var exponent = Math.Pow(10, power);
|
||||
var rounded = Math.Round(value / exponent, _roundingFractionalDigits) * exponent;
|
||||
var rounded = Math.Round(value / exponent, _roundingSignificantDigits) * exponent;
|
||||
return rounded;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user