50 references to Round
Aspire.Dashboard (1)
Components\Controls\SummaryDetailsView.razor.cs (1)
204
await LocalStore.SetUnprotectedAsync(GetSizeStorageKey(), Math.
Round
(panel1Fraction, 3));
KeyManagementSimulator (2)
Program.cs (2)
194
Console.WriteLine($"Instance {i}: {Math.
Round
(cumulativeProblemTime.TotalHours, 2)} hours");
198
Console.WriteLine($"Total missing key score (lower is better) = {Math.
Round
(totalProblemTime.TotalHours, 2)} hours");
Metrics (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33
private static int RoundMetricValue(double value) => (int)Math.
Round
(value, 0);
Metrics.Legacy (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33
private static int RoundMetricValue(double value) => (int)Math.
Round
(value, 0);
Microsoft.Build (3)
BackEnd\BuildManager\BuildManager.cs (1)
1990
Math.
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)
33
private static int RoundMetricValue(double value) => (int)Math.
Round
(value, 0);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33
private static int RoundMetricValue(double value) => (int)Math.
Round
(value, 0);
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33
private static int RoundMetricValue(double value) => (int)Math.
Round
(value, 0);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (6)
EditAndContinue\SyntaxComparerTests.cs (6)
112
Assert.Equal(0.33, Math.
Round
(distance, 2));
119
Assert.Equal(1, Math.
Round
(distance, 2));
129
Assert.Equal(0, Math.
Round
(distance, 2));
135
Assert.Equal(0, Math.
Round
(distance, 2));
141
Assert.Equal(0, Math.
Round
(distance, 2));
147
Assert.Equal(0, Math.
Round
(distance, 2));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ConstantTests.cs (2)
4019
floatConst = ConstantValue.Create(Math.
Round
(1f / 3f, 5)),
4020
doubleConst = ConstantValue.Create(Math.
Round
((double)1 / 3, 8)),
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33
private static int RoundMetricValue(double value) => (int)Math.
Round
(value, 0);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (5)
Linux\AcceptanceTest.cs (5)
180
Assert.Equal(0.1, Math.
Round
(provider.Resources.GuaranteedCpuUnits, 1)); // hack to make hardcoded calculation in resource utilization main package work.
181
Assert.Equal(0.2d, Math.
Round
(provider.Resources.MaximumCpuUnits, 1)); // read from cpuset.cpus
349
var roundedCpuUsedPercentage = Math.
Round
(utilization.CpuUsedPercentage, 1);
430
var roundedCpuUsedPercentage = Math.
Round
(utilization.CpuUsedPercentage, 1);
510
var 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)
639
delta = Math.
Round
(delta, digitsOfPrecision);
654
delta2 = Math.
Round
(expected - actual, digitsOfPrecision);
684
return scale * Math.
Round
(value / scale, digitsOfPrecision);
PresentationFramework (7)
MS\Internal\Documents\RowCache.cs (6)
310
double roundedOffset = Math.
Round
(offset, _findOffsetPrecision);
318
double rowOffset = Math.
Round
(_rowCache[i].VerticalOffset, _findOffsetPrecision);
319
double rowHeight = Math.
Round
(_rowCache[i].RowSize.Height, _findOffsetPrecision);
410
startOffset = Math.
Round
(startOffset, _findOffsetPrecision);
411
endOffset = Math.
Round
(endOffset, _findOffsetPrecision);
417
double rowOffset = Math.
Round
(_rowCache[i].VerticalOffset, _findOffsetPrecision);
System\Windows\Documents\TextStore.cs (1)
2849
double angleCos = Math.
Round
((radCos * 180) / Math.PI, 0);
Roslyn.Diagnostics.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
33
private static int RoundMetricValue(double value) => (int)Math.
Round
(value, 0);
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
686
public static double Round(double x, int digits) => Math.
Round
(x, digits);
System.Runtime.Numerics (1)
System\Numerics\BigInteger.cs (1)
1623
significand = 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)
33
private 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);