50 references to Round
Aspire.Dashboard (1)
Components\Controls\SummaryDetailsView.razor.cs (1)
204await LocalStore.SetUnprotectedAsync(GetSizeStorageKey(), Math.Round(panel1Fraction, 3));
KeyManagementSimulator (2)
Program.cs (2)
194Console.WriteLine($"Instance {i}: {Math.Round(cumulativeProblemTime.TotalHours, 2)} hours"); 198Console.WriteLine($"Total missing key score (lower is better) = {Math.Round(totalProblemTime.TotalHours, 2)} hours");
Metrics (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33private static int RoundMetricValue(double value) => (int)Math.Round(value, 0);
Metrics.Legacy (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33private static int RoundMetricValue(double value) => (int)Math.Round(value, 0);
Microsoft.Build (3)
BackEnd\BuildManager\BuildManager.cs (1)
1990Math.Round(projectGraph.ConstructionMetrics.ConstructionTime.TotalSeconds, 3),
Logging\BaseConsoleLogger.cs (1)
812"{0,5}", Math.Round(elapsedTime.TotalMilliseconds, 0));
Logging\ParallelLogger\ParallelConsoleLogger.cs (1)
1744"{0,5}", Math.Round(elapsedTime.TotalMilliseconds, 0));
Microsoft.CodeAnalysis.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33private static int RoundMetricValue(double value) => (int)Math.Round(value, 0);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33private static int RoundMetricValue(double value) => (int)Math.Round(value, 0);
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33private static int RoundMetricValue(double value) => (int)Math.Round(value, 0);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (6)
EditAndContinue\SyntaxComparerTests.cs (6)
112Assert.Equal(0.33, Math.Round(distance, 2)); 119Assert.Equal(1, Math.Round(distance, 2)); 129Assert.Equal(0, Math.Round(distance, 2)); 135Assert.Equal(0, Math.Round(distance, 2)); 141Assert.Equal(0, Math.Round(distance, 2)); 147Assert.Equal(0, Math.Round(distance, 2));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ConstantTests.cs (2)
4019floatConst = ConstantValue.Create(Math.Round(1f / 3f, 5)), 4020doubleConst = ConstantValue.Create(Math.Round((double)1 / 3, 8)),
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33private static int RoundMetricValue(double value) => (int)Math.Round(value, 0);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (5)
Linux\AcceptanceTest.cs (5)
180Assert.Equal(0.1, Math.Round(provider.Resources.GuaranteedCpuUnits, 1)); // hack to make hardcoded calculation in resource utilization main package work. 181Assert.Equal(0.2d, Math.Round(provider.Resources.MaximumCpuUnits, 1)); // read from cpuset.cpus 349var roundedCpuUsedPercentage = Math.Round(utilization.CpuUsedPercentage, 1); 430var roundedCpuUsedPercentage = Math.Round(utilization.CpuUsedPercentage, 1); 510var roundedCpuUsedPercentage = Math.Round(utilization.CpuUsedPercentage, 1);
Microsoft.Maui.Controls (1)
Stepper\Stepper.cs (1)
38 return Math.Round(((double)value), stepper.digits).Clamp(stepper.Minimum, stepper.Maximum);
Microsoft.ML.TestFramework (3)
BaseTestBaseline.cs (3)
639delta = Math.Round(delta, digitsOfPrecision); 654delta2 = Math.Round(expected - actual, digitsOfPrecision); 684return scale * Math.Round(value / scale, digitsOfPrecision);
PresentationFramework (7)
MS\Internal\Documents\RowCache.cs (6)
310double roundedOffset = Math.Round(offset, _findOffsetPrecision); 318double rowOffset = Math.Round(_rowCache[i].VerticalOffset, _findOffsetPrecision); 319double rowHeight = Math.Round(_rowCache[i].RowSize.Height, _findOffsetPrecision); 410startOffset = Math.Round(startOffset, _findOffsetPrecision); 411endOffset = Math.Round(endOffset, _findOffsetPrecision); 417double rowOffset = Math.Round(_rowCache[i].VerticalOffset, _findOffsetPrecision);
System\Windows\Documents\TextStore.cs (1)
2849double angleCos = Math.Round((radCos * 180) / Math.PI, 0);
Roslyn.Diagnostics.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33private static int RoundMetricValue(double value) => (int)Math.Round(value, 0);
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
686public static double Round(double x, int digits) => Math.Round(x, digits);
System.Runtime.Numerics (1)
System\Numerics\BigInteger.cs (1)
1623significand = Math.Round(significand, 8);
System.Windows.Forms.Primitives.TestUtilities (2)
GdiHelper.cs (2)
39=> (int)Math.Round((double)((long)LogicalPixelsX * himetric) / HiMetricPerInch, 0); 45=> (int)Math.Round((double)((long)LogicalPixelsY * himetric) / HiMetricPerInch, 0);
Text.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33private static int RoundMetricValue(double value) => (int)Math.Round(value, 0);
xunit.assert (8)
EqualityAsserts.cs (8)
346 var expectedRounded = Math.Round(expected, precision); 347 var actualRounded = Math.Round(actual, precision); 418 var expectedRounded = Math.Round(expected, precision); 419 var actualRounded = Math.Round(actual, precision); 827 var expectedRounded = Math.Round(expected, precision); 828 var actualRounded = Math.Round(actual, precision); 899 var expectedRounded = Math.Round(expected, precision); 900 var actualRounded = Math.Round(actual, precision);