849 references to Max
Aspire.Dashboard (1)
Components\Controls\Chart\ChartBase.cs (1)
459dimensionValue = Math.Max(value, dimensionValue);
Metrics (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.FieldMetricData.cs (2)
47double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 48double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.MethodMetricData.cs (2)
58double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 59double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (2)
175double logAvgComputationalComplexityVolume = Math.Max(0.0, Math.Log(avgComputationalComplexityVolume)); //avoid Log(0) = -Infinity 176double logAvgLinesOfCode = Math.Max(0.0, Math.Log(avgEffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
437=> Length * Math.Max(0.0, Math.Log(Vocabulary, 2));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
37maintIndex = Math.Max(0.0, maintIndex);
Metrics.Legacy (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.FieldMetricData.cs (2)
47double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 48double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.MethodMetricData.cs (2)
58double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 59double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (2)
175double logAvgComputationalComplexityVolume = Math.Max(0.0, Math.Log(avgComputationalComplexityVolume)); //avoid Log(0) = -Infinity 176double logAvgLinesOfCode = Math.Max(0.0, Math.Log(avgEffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
437=> Length * Math.Max(0.0, Math.Log(Vocabulary, 2));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
37maintIndex = Math.Max(0.0, maintIndex);
Microsoft.AspNetCore.Routing (1)
Matching\NegotiationMatcherPolicy.cs (1)
369result = Math.Max(result, endpointsQuality[i]);
Microsoft.Build (2)
BackEnd\Components\Caching\ConfigCache.cs (1)
283remainingToRelease = Convert.ToInt32(Math.Max(1, Math.Floor(_configurations.Count * 0.1)));
Evaluation\Expander\WellKnownFunctions.cs (1)
819returnVal = Math.Max(arg0, arg1);
Microsoft.CodeAnalysis.Analyzers (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.FieldMetricData.cs (2)
47double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 48double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.MethodMetricData.cs (2)
58double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 59double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (2)
175double logAvgComputationalComplexityVolume = Math.Max(0.0, Math.Log(avgComputationalComplexityVolume)); //avoid Log(0) = -Infinity 176double logAvgLinesOfCode = Math.Max(0.0, Math.Log(avgEffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
437=> Length * Math.Max(0.0, Math.Log(Vocabulary, 2));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
37maintIndex = Math.Max(0.0, maintIndex);
Microsoft.CodeAnalysis.AnalyzerUtilities (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.FieldMetricData.cs (2)
47double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 48double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.MethodMetricData.cs (2)
58double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 59double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (2)
175double logAvgComputationalComplexityVolume = Math.Max(0.0, Math.Log(avgComputationalComplexityVolume)); //avoid Log(0) = -Infinity 176double logAvgLinesOfCode = Math.Max(0.0, Math.Log(avgEffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
437=> Length * Math.Max(0.0, Math.Log(Vocabulary, 2));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
37maintIndex = Math.Max(0.0, maintIndex);
Microsoft.CodeAnalysis.BannedApiAnalyzers (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.FieldMetricData.cs (2)
47double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 48double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.MethodMetricData.cs (2)
58double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 59double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (2)
175double logAvgComputationalComplexityVolume = Math.Max(0.0, Math.Log(avgComputationalComplexityVolume)); //avoid Log(0) = -Infinity 176double logAvgLinesOfCode = Math.Max(0.0, Math.Log(avgEffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
437=> Length * Math.Max(0.0, Math.Log(Vocabulary, 2));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
37maintIndex = Math.Max(0.0, maintIndex);
Microsoft.CodeAnalysis.EditorFeatures (3)
InlineRename\UI\Adornment\RenameFlyout.xaml.cs (2)
150Canvas.SetTop(this, Math.Max(0, top)); 151Canvas.SetLeft(this, Math.Max(0, left));
IWpfDifferenceViewerExtensions.cs (1)
112_width = Math.Max(textView.MaxTextRightCoordinate * (textView.ZoomLevel / 100), _minWidth); // Width of the widest line.
Microsoft.CodeAnalysis.ResxSourceGenerator (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.FieldMetricData.cs (2)
47double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 48double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.MethodMetricData.cs (2)
58double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 59double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (2)
175double logAvgComputationalComplexityVolume = Math.Max(0.0, Math.Log(avgComputationalComplexityVolume)); //avoid Log(0) = -Infinity 176double logAvgLinesOfCode = Math.Max(0.0, Math.Log(avgEffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
437=> Length * Math.Max(0.0, Math.Log(Vocabulary, 2));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
37maintIndex = Math.Max(0.0, maintIndex);
Microsoft.Data.Analysis (4)
PrimitiveDataFrameColumnComputations.cs (4)
1747ret = (double)(Math.Max(readOnlySpan[i], ret)); 1791ret = (double)Math.Max(span[(int)row], ret); 2003value = (double)(Math.Max(readOnlySpan[i], value)); 2030value = (double)(Math.Max(readOnlySpan[(int)row], value));
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Calculator.cs (1)
41double cpuUtilization = Math.Max(0.0, totalUsageTickDelta / totalSystemTicks * Hundred);
Microsoft.Maui (19)
Layouts\AbsoluteLayoutManager.cs (2)
49 measuredHeight = Math.Max(measuredHeight, bounds.Top + height); 50 measuredWidth = Math.Max(measuredWidth, bounds.Left + width);
Layouts\FlexLayoutManager.cs (2)
63 measuredHeight = Math.Max(measuredHeight, frame.Bottom); 64 measuredWidth = Math.Max(measuredWidth, frame.Right);
Layouts\GridLayoutManager.cs (3)
638 starSize = Math.Max(starSize, dimension(_childrenToLayOut[cell.ViewIndex].DesiredSize)); 912 maxCurrentSize = Math.Max(maxCurrentSize, definitionSize); 913 maxCurrentStarSize = Math.Max(maxCurrentStarSize, definitionSize / definition.GridLength.Value);
Layouts\HorizontalStackLayoutManager.cs (1)
32 measuredHeight = Math.Max(measuredHeight, measure.Height);
Layouts\LayoutExtensions.cs (6)
50 var frameWidth = Math.Max(0, consumedWidth - margin.HorizontalThickness); 64 var frameHeight = Math.Max(0, consumedHeight - margin.VerticalThickness); 189 size.Width = Math.Max(bounds.Width, size.Width); 194 size.Height = Math.Max(bounds.Height, size.Height); 225 bounds.Width = Math.Max(bounds.Width, presentedContent.DesiredSize.Width + padding.HorizontalThickness); 226 bounds.Height = Math.Max(bounds.Height, presentedContent.DesiredSize.Height + padding.VerticalThickness);
Layouts\VerticalStackLayoutManager.cs (1)
33 measuredWidth = Math.Max(measuredWidth, measure.Width);
VisualDiagnostics\AdornerModel.cs (4)
71 rc.Left = rect.Left - Math.Max(0, margin.Left); 72 rc.Right = rect.Right + Math.Max(0, margin.Right); 82 rc.Left = rect.Left - Math.Max(0, margin.Left); 83 rc.Right = rect.Right + Math.Max(0, margin.Right);
Microsoft.Maui.Controls (69)
Animation.cs (1)
90 double val = Math.Max(0.0f, Math.Min(1.0f, (f - animation.StartDelay) / (animation.Duration)));
AnimationExtensions.cs (1)
300 velocity = Math.Max(0, velocity);
LegacyLayouts\AbsoluteLayout.cs (6)
103 bestFitSize.Width = Math.Max(bestFitSize.Width, desiredSize.Request.Width); 104 bestFitSize.Height = Math.Max(bestFitSize.Height, desiredSize.Request.Height); 105 minimum.Width = Math.Max(minimum.Width, desiredSize.Minimum.Width); 106 minimum.Height = Math.Max(minimum.Height, desiredSize.Minimum.Height); 204 width += sizeRequest.Value.Request.Width / Math.Max(0.25, bounds.Width); 223 height += sizeRequest.Value.Request.Height / Math.Max(0.25, bounds.Height);
LegacyLayouts\FlexLayout.cs (2)
464 widthConstraint = Math.Max(widthConstraint, item.Frame[0] + item.Frame[2] + item.MarginRight); 470 heightConstraint = Math.Max(heightConstraint, item.Frame[1] + item.Frame[3] + item.MarginBottom);
LegacyLayouts\GridCalc.cs (23)
201 actualHeight = Math.Max(actualHeight, sizeRequest.Request.Height - assignedHeight - grid.RowSpacing * (GetRowSpan(child) - 1)); 202 minimumHeight = Math.Max(minimumHeight, sizeRequest.Minimum.Height - assignedHeight - grid.RowSpacing * (GetRowSpan(child) - 1)); 234 actualWidth = Math.Max(actualWidth, sizeRequest.Request.Width - assignedWidth - (GetColumnSpan(child) - 1) * grid.ColumnSpacing); 235 minimumWidth = Math.Max(minimumWidth, sizeRequest.Minimum.Width - assignedWidth - (GetColumnSpan(child) - 1) * grid.ColumnSpacing); 272 columnwWidthSum += Math.Max(0, c.ActualWidth); 284 rowHeightSum += Math.Max(0, r.ActualHeight); 317 double contractionNeeded = Math.Min(contractionSpace, Math.Max(currentSize.Width - targetWidth, 0)); 325 double availableSpace = col.ActualWidth - Math.Max(col.MinimumWidth, 0); 352 double contractionNeeded = Math.Min(contractionSpace, Math.Max(currentSize.Height - targetHeight, 0)); 411 double contractionNeeded = Math.Min(contractionSpace, Math.Max(request.Width - targetWidth, 0)); 473 double contractionNeeded = Math.Min(contractionSpace, Math.Max(request.Height - targetHeight, 0)); 605 starColWidth = Math.Max(starColWidth, GetUnassignedWidth(width, columnSpacing) / totalStarsWidth); 635 starRowHeight = Math.Max(starRowHeight, GetUnassignedHeight(height, rowSpacing) / totalStarsHeight); 677 actualWidth = Math.Max(actualWidth, sizeRequest.Request.Width - assignedWidth - columnSpacing); 678 minimumWidth = Math.Max(minimumWidth, sizeRequest.Minimum.Width - assignedWidth - columnSpacing); 697 starColRequestWidth = Math.Max(starColRequestWidth, col.ActualWidth / col.Width.Value); 698 starColMinWidth = Math.Max(starColMinWidth, col.MinimumWidth / col.Width.Value); 706 return Math.Max(widthConstraint / totalStarsWidth, starColMinWidth); 738 actualHeight = Math.Max(actualHeight, sizeRequest.Request.Height - assignedHeight - rowSpacing); 739 minimumHeight = Math.Max(minimumHeight, sizeRequest.Minimum.Height - assignedHeight - rowSpacing); 758 starRowRequestHeight = Math.Max(starRowRequestHeight, row.ActualHeight / row.Height.Value); 759 starRowMinHeight = Math.Max(starRowMinHeight, row.MinimumHeight / row.Height.Value); 767 return Math.Max(heightConstraint / totalStarsHeight, starRowMinHeight);
LegacyLayouts\Layout.cs (6)
249 double diff = Math.Max(0, region.Width - request.Request.Width); 266 double diff = Math.Max(0, region.Height - request.Request.Height); 460 double w = Math.Max(0, width - Padding.HorizontalThickness); 461 double h = Math.Max(0, height - Padding.VerticalThickness); 513 double diff = Math.Max(0, region.Width - request.Request.Width); 530 double diff = Math.Max(0, region.Height - request.Request.Height);
LegacyLayouts\RelativeLayout.cs (2)
227 boundsRectangle.Right = Math.Max(boundsRectangle.Right, bounds.Right); 228 boundsRectangle.Bottom = Math.Max(boundsRectangle.Bottom, bounds.Bottom);
LegacyLayouts\StackLayout.cs (8)
178 layout.CompressionSpace += Math.Max(0, request.Request.Height - request.Minimum.Height); 181 boundsWidth = Math.Max(boundsWidth, request.Request.Width); 184 minimumWidth = Math.Max(minimumWidth, request.Minimum.Width); 213 layout.CompressionSpace += Math.Max(0, request.Request.Width - request.Minimum.Width); 217 boundsHeight = Math.Max(boundsHeight, request.Request.Height); 219 minimumHeight = Math.Max(minimumHeight, request.Minimum.Height); 281 layout.Bounds.Height = Math.Max(layout.Bounds.Height, plot.Height); 353 layout.Bounds.Width = Math.Max(layout.Bounds.Width, plot.Width);
ListView\ListView.cs (1)
439 request = new Size(width, Math.Max(scaled.Width, scaled.Height));
Page\Page.cs (4)
431 area.Width = Math.Max(0, area.Width); 432 area.Height = Math.Max(0, area.Height); 594 double w = Math.Max(0, Width - Padding.HorizontalThickness); 595 double h = Math.Max(0, Height - Padding.VerticalThickness);
Shapes\Matrix.cs (6)
747 rect.Width = Math.Max(Math.Max(point0.X, point1.X), Math.Max(point2.X, point3.X)) - rect.X; 748 rect.Height = Math.Max(Math.Max(point0.Y, point1.Y), Math.Max(point2.Y, point3.Y)) - rect.Y;
Shapes\Rectangle.cs (1)
60 float cornerRadius = (float)Math.Max(RadiusX, RadiusY);
Shapes\RoundRectangle.cs (4)
92 float topLeftCornerRadius = (float)Math.Max(0, CornerRadius.TopLeft - strokeThickness); 93 float topRightCornerRadius = (float)Math.Max(0, CornerRadius.TopRight - strokeThickness); 94 float bottomLeftCornerRadius = (float)Math.Max(0, CornerRadius.BottomLeft - strokeThickness); 95 float bottomRightCornerRadius = (float)Math.Max(0, CornerRadius.BottomRight - strokeThickness);
Shapes\Shape.cs (1)
430 double maxScale = Math.Max(scaleX, scaleY);
TableView\TableView.cs (1)
140 var request = new Size(width, Math.Max(scaled.Width, scaled.Height));
VisualElement\VisualElement.cs (2)
1242 widthConstraint = Math.Max(0, widthConstraint - margin.HorizontalThickness); 1243 heightConstraint = Math.Max(0, heightConstraint - margin.VerticalThickness);
Microsoft.Maui.Graphics (4)
Rect.cs (4)
107 return FromLTRB(Math.Min(r1.Left, r2.Left), Math.Min(r1.Top, r2.Top), Math.Max(r1.Right, r2.Right), Math.Max(r1.Bottom, r2.Bottom)); 117 double x = Math.Max(r1.X, r2.X); 118 double y = Math.Max(r1.Y, r2.Y);
Microsoft.Maui.Maps (5)
Primitives\MapSpan.cs (5)
14 LatitudeDegrees = Math.Min(Math.Max(latitudeDegrees, MinimumRangeDegrees), 90.0); 15 LongitudeDegrees = Math.Min(Math.Max(longitudeDegrees, MinimumRangeDegrees), 180.0); 36 north = Math.Min(Math.Max(north, 0), 90); 37 south = Math.Max(Math.Min(south, 0), -90); 38 double lat = Math.Max(Math.Min(Center.Latitude, north), south);
Microsoft.ML.AutoML (6)
AutoMLExperiment\IPerformanceMonitor.cs (2)
127_peakCpuUsage = Math.Max(cpuUsageInTotal, _peakCpuUsage ?? 0); 131_peakMemoryUsage = Math.Max(memoryUsage, _peakMemoryUsage ?? 0);
ColumnInference\TextFileSample.cs (1)
126averageLineLength = Math.Max(averageLineLength, 3);
Tuner\PipelineProposer.cs (2)
181var eci1 = Math.Max(_k1[schema], _k2[schema]); 183_eci[schema] = Math.Max(eci1, estimatorCostForBreakThrough);
Utils\ArrayMath.cs (1)
42return xArray.Select(x => Math.Min(Math.Max(x, min), max)).ToArray();
Microsoft.ML.AutoML.Tests (1)
TunerTests.cs (1)
269bestMetric = Math.Max(bestMetric, metric);
Microsoft.ML.Core (1)
Utilities\MathUtils.cs (1)
390return Math.Max(0, Math.Min(result, 1));
Microsoft.ML.Data (3)
Evaluators\ClusteringEvaluator.cs (1)
308maxi = Math.Max(maxi, num / denom);
Transforms\NormalizeColumnDbl.cs (1)
1436scale = 1 / Math.Max(Math.Abs(max), Math.Abs(min));
Utils\LossFunctions.cs (1)
179return Math.Log(Math.Max(x, 1e-8));
Microsoft.ML.FastTree (7)
Dataset\FeatureFlock.cs (2)
535double minDocs = Math.Max(learner.MinDocsForCategoricalSplit, 731double minDocs = Math.Max(learner.MinDocsForCategoricalSplit,
Training\EnsembleCompression\LassoBasedEnsembleCompressor.cs (4)
239double alf = Math.Pow(Math.Max(Epsilon, flmin), 1.0 / (numberOfLambdas - 1)); 263curLambda = Math.Max(curLambda, Math.Abs(feature2residualCorrelations[j])); 339maxDelta = Math.Max((delta >= 0 ? delta : -delta), maxDelta); 374maxDelta = Math.Max((delta >= 0 ? delta : -delta), maxDelta);
Training\StepSearch.cs (1)
31_historicStepSize = Math.Max(1.0, _minStepSize);
Microsoft.ML.Mkl.Components (1)
OlsLinearRegression.cs (1)
149private static Double ProbClamp(Double p) => Math.Max(0, Math.Min(p, 1));
Microsoft.ML.Predictor.Tests (2)
CompareBaselines.cs (2)
273return Math.Abs(d1 - d2) / Math.Max(1, Math.Max(Math.Abs(d1), Math.Abs(d2)));
Microsoft.ML.StandardTrainers (1)
Standard\MulticlassClassification\PairwiseCouplingTrainer.cs (1)
449return pii / Math.Max(pii, sum - (_numClasses - 2) * pii);
Microsoft.ML.Sweeper (3)
Algorithms\KdoSweeper.cs (2)
250double bandwidthScale = Math.Max(_args.MinimumMutationSpread, correctedVal); 265double eps = Math.Min(Math.Max(child[index], epsCutoff), 1 - epsCutoff);
Algorithms\SweeperProbabilityUtils.cs (1)
32variance = Math.Max(variance, minVariance);
Microsoft.ML.TimeSeries (8)
AdaptiveSingularSpectrumSequenceModeler.cs (2)
1033maxTrendMagnitude = Math.Max(maxTrendMagnitude, roots[i].Magnitude); 1036maxNonTrendMagnitude = Math.Max(maxNonTrendMagnitude, roots[i].Magnitude);
SequentialAnomalyDetectionTransformBase.cs (1)
485bandWidth = Math.Max(bandWidth, 1e-6);
SrCnnEntireAnomalyDetector.cs (3)
508_maximumOriginValue = Math.Max(_maximumOriginValue, value); 625score = Math.Max(score, _minimumScore); 882return Math.Max(Math.Min(expectedValue, value + boundMargin), value - boundMargin);
STL\LocalRegression.cs (2)
98double range = Math.Max(leftRange, rightRange); 129double range = Math.Max(leftRange, rightRange);
Microsoft.ML.Transforms (1)
Expression\BuiltinFunctions.cs (1)
290FunctionProviderUtils.Fn<R8, R8, R8>(Math.Max));
PresentationCore (63)
MS\Internal\Ink\CuspData.cs (1)
472rMax = Math.Max(a, rMax);
MS\Internal\Ink\EllipticalNodeOperations.cs (2)
29_radius = Math.Max(_radii.Width, _radii.Height); 754findex = Math.Abs(Math.Min(s1, s2) - 0d) < Math.Abs(Math.Max(s1, s2) - 1d) ? 0d : 1d;
MS\Internal\Ink\ErasingStroke.cs (1)
183Math.Max(lastFragment.EndFIndex, fragment.EndFIndex));
MS\Internal\Ink\Lasso.cs (2)
151DoubleUtil.LessThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X))) 160if (DoubleUtil.GreaterThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X)))
MS\Internal\Ink\StrokeRenderer.cs (7)
106if ((Math.Min(prevArea, currArea) / Math.Max(prevArea, currArea)) <= 0.70d) 248double maxExtent = Math.Max(drawingAttributes.Height, drawingAttributes.Width); 527if ((Math.Min(prevArea, currArea) / Math.Max(prevArea, currArea)) <= 0.90d) 832double intersectLeft = Math.Max(rect1.Left, rect2.Left); 833double intersectTop = Math.Max(rect1.Top, rect2.Top); 834double intersectWidth = Math.Max((double)(Math.Min(rect1.Right, rect2.Right) - intersectLeft), (double)0); 835double intersectHeight = Math.Max((double)(Math.Min(rect1.Bottom, rect2.Bottom) - intersectTop), (double)0);
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (8)
495if (!((Math.Max(visEdgeStart.X, visEdgeEnd.X) < Math.Min(uv1.X, uv2.X)) || 496(Math.Min(visEdgeStart.X, visEdgeEnd.X) > Math.Max(uv1.X, uv2.X)) || 497(Math.Max(visEdgeStart.Y, visEdgeEnd.Y) < Math.Min(uv1.Y, uv2.Y)) || 498(Math.Min(visEdgeStart.Y, visEdgeEnd.Y) > Math.Max(uv1.Y, uv2.Y)))) 913if (!((Math.Max(visEdgeStart.X, visEdgeEnd.X) < Math.Min(uv1.X, uv2.X)) || 914(Math.Min(visEdgeStart.X, visEdgeEnd.X) > Math.Max(uv1.X, uv2.X)) || 915(Math.Max(visEdgeStart.Y, visEdgeEnd.Y) < Math.Min(uv1.Y, uv2.Y)) || 916(Math.Min(visEdgeStart.Y, visEdgeEnd.Y) > Math.Max(uv1.Y, uv2.Y))))
MS\Internal\Media3D\LineUtil.cs (1)
281maxvalue = Math.Max(maxvalue,m[i,j]*m[i,j]);
MS\Internal\TextFormatting\SimpleTextLine.cs (3)
288realHeight = Math.Max(realHeight, run.Height); 289realAscent = Math.Max(realAscent, run.Baseline); 290realDescent = Math.Max(realDescent, run.Height - run.Baseline);
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
691value = Math.Max(value, Constants.DefaultIdealToReal);
System\Windows\Ink\Stroke2.cs (2)
377selectedDA.Height = Math.Max(selectedDA.Height, DrawingAttributes.DefaultHeight); 378selectedDA.Width = Math.Max(selectedDA.Width, DrawingAttributes.DefaultWidth);
System\Windows\Input\ManipulationLogic.cs (1)
496Radius = (float)Math.Max(1.0, pivot.Radius)
System\Windows\Input\Stylus\Pointer\PointerTabletDevice.cs (2)
138_doubleTapSize.Width = Math.Max(mouseDoubleTapDefault.Width, _doubleTapSize.Width); 139_doubleTapSize.Height = Math.Max(mouseDoubleTapDefault.Height, _doubleTapSize.Height);
System\Windows\Input\Stylus\Wisp\WispTabletDevice.cs (4)
289_cancelSize.Width = Math.Max(mouseDragDefault.Width, _cancelSize.Width); 290_cancelSize.Height = Math.Max(mouseDragDefault.Height, _cancelSize.Height); 297_doubleTapSize.Width = Math.Max(mouseDoubleTapDefault.Width, _doubleTapSize.Width); 298_doubleTapSize.Height = Math.Max(mouseDoubleTapDefault.Height, _doubleTapSize.Height);
System\Windows\Media\Animation\BackEase.cs (1)
43double amp = Math.Max(0.0, Amplitude);
System\Windows\Media\Animation\BounceEase.cs (1)
81double bounces = Math.Max(0.0, (double)Bounces);
System\Windows\Media\Animation\CircleEase.cs (1)
15normalizedTime = Math.Max(0.0, Math.Min(1.0, normalizedTime));
System\Windows\Media\Animation\Clock.cs (1)
4154long error = (long)Math.Max(_appliedSpeedRatio, 1.0);
System\Windows\Media\Animation\ElasticEase.cs (2)
71double oscillations = Math.Max(0.0, (double)Oscillations); 72double springiness = Math.Max(0.0, Springiness);
System\Windows\Media\Animation\PowerEase.cs (1)
46double power = Math.Max(0.0, Power);
System\Windows\Media\FormattedText.cs (4)
1766accBlackBoxRight = Math.Max(accBlackBoxRight, blackBoxRight); 1767accBlackBoxBottom = Math.Max(accBlackBoxBottom, blackBoxBottom); 1774metrics.Width = Math.Max(metrics.Width, currentLine.Width); 1775metrics.WidthIncludingTrailingWhitespace = Math.Max(metrics.WidthIncludingTrailingWhitespace, currentLine.WidthIncludingTrailingWhitespace);
System\Windows\Media\GlyphRun.cs (1)
1431return Math.Max(advance, oneSideBearing + otherSideBearing + 1);
System\Windows\Media\Imaging\BitmapSource.cs (2)
463return new Size(Math.Max(0, GetWidthInternal()), 464Math.Max(0, GetHeightInternal()));
System\Windows\Media3D\Quaternion.cs (5)
150double maxcoeff = Math.Max(Math.Abs(_x),Math.Max(Math.Abs(_y),Math.Abs(_z))); 425double max = Math.Max(Math.Max(Math.Abs(_x),Math.Abs(_y)), 426Math.Max(Math.Abs(_z),Math.Abs(_w)));
System\Windows\Media3D\Rect3D.cs (9)
79_sizeX = Math.Max(point1._x, point2._x) - _x; 80_sizeY = Math.Max(point1._y, point2._y) - _y; 81_sizeZ = Math.Max(point1._z, point2._z) - _z; 417double x = Math.Max(_x, rect._x); 418double y = Math.Max(_y, rect._y); 419double z = Math.Max(_z, rect._z); 458_sizeX = Math.Max(_x + _sizeX, rect._x + rect._sizeX) - x; 459_sizeY = Math.Max(_y + _sizeY, rect._y + rect._sizeY) - y; 460_sizeZ = Math.Max(_z + _sizeZ, rect._z + rect._sizeZ) - z;
PresentationFramework (445)
MS\Internal\Controls\InkCanvasInnerCanvas.cs (4)
93newSize.Width = Math.Max(newSize.Width, left + child.DesiredSize.Width); 97newSize.Width = Math.Max(newSize.Width, child.DesiredSize.Width); 103newSize.Height = Math.Max(newSize.Height, top + child.DesiredSize.Height); 107newSize.Height = Math.Max(newSize.Height, child.DesiredSize.Height);
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (2)
1052offset = Math.Max(offset, -(rectStickyNote.Left - rectPage.Left)); 1063offset = Math.Max(offset, -(rectStickyNote.Top - rectPage.Top));
MS\Internal\Documents\DocumentGrid.cs (6)
577clippedHorizontalOffset = Math.Max(clippedHorizontalOffset, 0.0); 620clippedVerticalOffset = Math.Max(clippedVerticalOffset, 0.0); 1213pageOffset = new Point(Math.Max(ViewportWidth, ExtentWidth) - (xOffset + pageSize.Width), yOffset); 1597double centerWidth = Math.Max(ViewportWidth, ExtentWidth); 2356newScale = Math.Max(newScale, CurrentMinimumScale); 2681Math.Max(0.0, (ExtentWidth - row.RowSize.Width) / 2.0) : 0.0;
MS\Internal\Documents\FlowDocumentView.cs (2)
141Math.Max(0, Math.Min(_scrollData.ExtentWidth - _scrollData.ViewportWidth, _scrollData.HorizontalOffset)), 142Math.Max(0, Math.Min(_scrollData.ExtentHeight - _scrollData.ViewportHeight, _scrollData.VerticalOffset)));
MS\Internal\Documents\RowCache.cs (4)
469_extentWidth = Math.Max(currentRow.RowSize.Width, _extentWidth); 979_extentWidth = Math.Max(newRow.RowSize.Width, _extentWidth); 1109_extentWidth = Math.Max(row.RowSize.Width, _extentWidth); 1379_rowSize.Height = Math.Max(pageSize.Height, _rowSize.Height);
MS\Internal\Documents\ScrollData.cs (2)
132offset = Math.Max(0, Math.Min(_extent.Width - _viewport.Width, offset)); 151offset = Math.Max(0, Math.Min(_extent.Height - _viewport.Height, offset));
MS\Internal\Documents\TextBoxView.cs (5)
1742Math.Max(0, Math.Min(_scrollData.ExtentWidth - _scrollData.ViewportWidth, _scrollData.HorizontalOffset)), 1743Math.Max(0, Math.Min(_scrollData.ExtentHeight - _scrollData.ViewportHeight, _scrollData.VerticalOffset))); 2232desiredSize.Width = Math.Max(desiredSize.Width, line.Width); 2602desiredSize.Width = Math.Max(desiredSize.Width, _lineMetrics[i].Width); 3069padding = Math.Max(0, viewport.Height - _contentSize.Height);
MS\Internal\Documents\TextParagraphView.cs (2)
717siblingGap = Math.Max(lineBox.X - (siblingLineBox.X + siblingLineBox.Width), 0); 746siblingGap = Math.Max(siblingLineBox.X - (lineBox.X + lineBox.Width), 0);
MS\Internal\Helper.cs (7)
1065headerSize.Height = Math.Max(itemsCorrectionFactor.Top, headerSize.Height); 1069headerSize.Height = Math.Max(virtualizingElement.DesiredSize.Height, headerSize.Height); 1071headerSize.Width = Math.Max(virtualizingElement.DesiredSize.Width, headerSize.Width); 1102itemPixelSize.Width = Math.Max(desiredSize.Width, itemPixelSize.Width); 1115itemPixelSizeBeforeViewport.Width = Math.Max(desiredSize.Width, itemPixelSizeBeforeViewport.Width); 1127itemPixelSizeInViewport.Width = Math.Max(desiredSize.Width, itemPixelSizeInViewport.Width); 1138itemPixelSizeAfterViewport.Width = Math.Max(desiredSize.Width, itemPixelSizeAfterViewport.Width);
MS\Internal\Ink\LassoHelper.cs (3)
229&& DoubleUtil.LessThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X))) 238if (DoubleUtil.GreaterThanOrClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X))) 244if ((0 == i) && DoubleUtil.AreClose(point.X, Math.Max(prevLassoPoint.X, lassoPoint.X)))
MS\Internal\PtsHost\CellParagraph.cs (1)
76Math.Max(TextDpi.FromTextDpi(dvrAvailable), 0));
MS\Internal\PtsHost\FigureHelper.cs (2)
174value = Math.Max(1, Math.Min(value, structuralCache.CurrentFormatContext.PageHeight)); 179value = Math.Max(1, Math.Min(value, structuralCache.CurrentFormatContext.PageHeight - pageMargin.Top - pageMargin.Bottom));
MS\Internal\PtsHost\FigureParagraph.cs (2)
601width = Math.Max(TextDpi.MinWidth, maxTotalWidth - elementMarginWidth); 630height = Math.Max(TextDpi.MinWidth, maxTotalHeight - elementMarginHeight);
MS\Internal\PtsHost\PtsHelper.cs (2)
879columnWidth = Math.Max(1, Math.Min(columnWidth, pageWidth)); 881freeSpace = Math.Max(0, freeSpace);
MS\Internal\PtsHost\PtsPage.cs (6)
771_calculatedSize.Width = Math.Max(TextDpi.MinWidth, TextDpi.FromTextDpi(rect.du)); 772_calculatedSize.Height = Math.Max(TextDpi.MinWidth, TextDpi.FromTextDpi(rect.dv)); 776_contentSize.Width = Math.Max(Math.Max(TextDpi.FromTextDpi(bbox.fsrc.du), TextDpi.MinWidth), _calculatedSize.Width); 777_contentSize.Height = Math.Max(TextDpi.MinWidth, TextDpi.FromTextDpi(bbox.fsrc.dv)); 783_contentSize.Height = Math.Max(_contentSize.Height, _calculatedSize.Height);
MS\Internal\PtsHost\TextParaClient.cs (2)
2077lineRect.Width = Math.Max(lineVisual.WidthIncludingTrailingWhitespace, 0); 2188elementRect.Width = Math.Max(lineVisual.WidthIncludingTrailingWhitespace, 0);
MS\Internal\PtsHost\UIElementParagraph.cs (2)
407elementHeight = Math.Max(TextDpi.FromTextDpi(1), elementHeight - TextDpi.FromTextDpi(mbp.MBPTop + mbp.MBPBottom)); 430elementHeight = Math.Max(TextDpi.FromTextDpi(1), elementHeight);
MS\Internal\Text\DynamicPropertyReader.cs (1)
210return Math.Max(TextDpi.MinWidth, Math.Min(TextDpi.MaxWidth, lineHeight));
MS\Internal\Text\LineProperties.cs (2)
182lineAdvance = Math.Max(lineAdvance, _lineHeight); 214lineAdvance = Math.Max(lineAdvance, _lineHeight);
MS\Internal\Text\TextDpi.cs (2)
167pageMargin.Right = Math.Max(0.0, pageSize.Width - pageMargin.Left - _minSize); 176pageMargin.Bottom = Math.Max(0.0, pageSize.Height - pageMargin.Top - _minSize);;
System\Windows\Controls\Border.cs (12)
229Size childConstraint = new Size(Math.Max(0.0, constraint.Width - combined.Width), 230Math.Max(0.0, constraint.Height - combined.Height)); 642Math.Max(0.0, rt.Width - thick.Left - thick.Right), 643Math.Max(0.0, rt.Height - thick.Top - thick.Bottom)); 986LeftTop = Math.Max(0.0, radii.TopLeft - left); 987TopLeft = Math.Max(0.0, radii.TopLeft - top); 988TopRight = Math.Max(0.0, radii.TopRight - top); 989RightTop = Math.Max(0.0, radii.TopRight - right); 990RightBottom = Math.Max(0.0, radii.BottomRight - right); 991BottomRight = Math.Max(0.0, radii.BottomRight - bottom); 992BottomLeft = Math.Max(0.0, radii.BottomLeft - bottom); 993LeftBottom = Math.Max(0.0, radii.BottomLeft - left);
System\Windows\Controls\DataGridCellsPanel.cs (5)
184measureHeight = Math.Max(measureHeight, blockMeasureSize.Height); 396measureSize.Height = Math.Max(measureSize.Height, childSize.Height); 416measureSize.Height = Math.Max(measureSize.Height, headerSize.Height); 611measureHeight = Math.Max(measureHeight, childSize.Height); 1892childMeasureWidth = Math.Max(averageColumnWidth, column.MinWidth);
System\Windows\Controls\DataGridColumnCollection.cs (11)
946availableStarSpace = Math.Max(0.0, availableStarSpace - columnMinWidth); 1227double displayValue = Math.Max(width.DesiredValue, minWidth); 1381Math.Max(width.DisplayValue - nonRetrievableSpace, changedColumn.MinWidth))); 1453return Math.Max(availableSpace - requiredSpace, 0.0); 1664column.UpdateWidthForStarColumn(Math.Max(columnDesiredWidth, column.MinWidth), columnDesiredWidth, columnDesiredWidth / perStarWidth); 1693double columnExcessWidth = onlyShrinkToDesiredWidth ? width.DisplayValue - Math.Max(width.DesiredValue, column.MinWidth) : width.DisplayValue - column.MinWidth; 2001giveAwayWidth = Math.Max(usedStarSpace - expectedStarSpace, 0.0); 2137giveAwayWidth = Math.Min(giveAwayWidth, Math.Max(0d, totalSpace - usedSpace)); 2192takeAwayWidth = Math.Max(0.0, takeAwayWidth - unusedSpace); 2263double usedStarSpace = ComputeStarColumnWidths(Math.Max(expectedStarSpace, sumOfStarMinWidths)); 2264takeAwayWidth = Math.Max(usedStarSpace - expectedStarSpace, 0.0);
System\Windows\Controls\DataGridHelper.cs (3)
32return new Size(size.Width, Math.Max(0.0, size.Height - thickness)); 36return new Size(Math.Max(0.0, size.Width - thickness), size.Height); 715value = Math.Max(value, minValue);
System\Windows\Controls\DataGridRow.cs (1)
542double minHeight = Math.Max(RowHeader.DesiredSize.Height, MinHeight);
System\Windows\Controls\DefinitionBase.cs (2)
125_minSize = Math.Max(_minSize, minSize); 875sharedMinSize = Math.Max(sharedMinSize, _registry[i]._minSize);
System\Windows\Controls\DockPanel.cs (10)
216childConstraint = new Size(Math.Max(0.0, constraint.Width - accumulatedWidth), 217Math.Max(0.0, constraint.Height - accumulatedHeight)); 237parentHeight = Math.Max(parentHeight, accumulatedHeight + childDesiredSize.Height); 243parentWidth = Math.Max(parentWidth, accumulatedWidth + childDesiredSize.Width); 250parentWidth = Math.Max(parentWidth, accumulatedWidth); 251parentHeight = Math.Max(parentHeight, accumulatedHeight); 281Math.Max(0.0, arrangeSize.Width - (accumulatedLeft + accumulatedRight)), 282Math.Max(0.0, arrangeSize.Height - (accumulatedTop + accumulatedBottom)) ); 295rcChild.X = Math.Max(0.0, arrangeSize.Width - accumulatedRight); 306rcChild.Y = Math.Max(0.0, arrangeSize.Height - accumulatedBottom);
System\Windows\Controls\DocumentViewer.cs (2)
1338VerticalOffset = Math.Max(verticalOffset, 0.0); 1339HorizontalOffset = Math.Max(horizontalOffset, 0.0);
System\Windows\Controls\FlowDocumentReader.cs (1)
722SetCurrentValueInternal(ZoomProperty, Math.Max(Zoom - ZoomIncrement, MinZoom));
System\Windows\Controls\FlowDocumentScrollViewer.cs (6)
584Math.Max(ia.OriginWidth, pagePadding.Left), 585Math.Max(ia.OriginHeight, pagePadding.Top), 586Math.Max(ia.MediaSizeWidth - (ia.OriginWidth + ia.ExtentWidth), pagePadding.Right), 587Math.Max(ia.MediaSizeHeight - (ia.OriginHeight + ia.ExtentHeight), pagePadding.Bottom)); 635Zoom = Math.Max(Zoom - ZoomIncrement, MinZoom); 705SetCurrentValueInternal(ZoomProperty, Math.Max(Zoom - ZoomIncrement, MinZoom));
System\Windows\Controls\Grid.cs (27)
368gridDesiredSize.Width = Math.Max(gridDesiredSize.Width, child.DesiredSize.Width); 369gridDesiredSize.Height = Math.Max(gridDesiredSize.Height, child.DesiredSize.Height); 1089userMinSize = Math.Max(userMinSize, Math.Min(userSize, userMaxSize)); 1113definitions[i].MeasureSize = Math.Max(userMinSize, Math.Min(userSize, userMaxSize)); 1451double maxSize = Math.Max(definitions[i].UserMaxSize, minSize); 1659double maxSize = Math.Max(definitions[i].MinSize, definitions[i].UserMaxSize); 1698double userSize = Math.Max(availableSize - takenSize, 0.0) * (starValue / tempDefinitions[i].SizeCache); 1700resolvedSize = Math.Max(tempDefinitions[i].MinSize, resolvedSize); 1812double effectiveMaxSize = Math.Max(def.MinSize, def.UserMaxSize); 1884resolvedSize = Math.Max(resolvedDef.MinSize, resolvedDef.UserMaxSize); 2002double resolvedSize = (def.MeasureSize > 0.0) ? Math.Max(availableSize - takenSize, 0.0) * (def.MeasureSize / def.SizeCache) : 0.0; 2006resolvedSize = Math.Max(def.MinSize, resolvedSize); 2099double maxSize = Math.Max(definitions[i].MinSizeForArrange, definitions[i].UserMaxSize); 2140definitions[i].SizeCache = Math.Max(definitions[i].MinSizeForArrange, Math.Min(userSize, userMaxSize)); 2185double userSize = Math.Max(finalSize - allPreferredArrangeSize, 0.0) * (starValue / definitions[definitionIndices[i]].SizeCache); 2187resolvedSize = Math.Max(definitions[definitionIndices[i]].MinSizeForArrange, resolvedSize); 2212final = Math.Max(final, definitions[definitionIndex].MinSizeForArrange); 2219final = Math.Max(final, definitions[definitionIndex].MinSizeForArrange); 2253final = Math.Max(final, definition.MinSizeForArrange); 2269final = Math.Max(final, definition.MinSizeForArrange); 2387double effectiveMaxSize = Math.Max(def.MinSizeForArrange, def.UserMaxSize); 2426def.SizeCache = Math.Max(def.MinSizeForArrange, Math.Min(userSize, userMaxSize)); 2495resolvedSize = Math.Max(resolvedDef.MinSizeForArrange, resolvedDef.UserMaxSize); 2627double resolvedSize = (def.MeasureSize > 0.0) ? Math.Max(finalSize - takenSize, 0.0) * (def.MeasureSize / def.SizeCache) : 0.0; 2631resolvedSize = Math.Max(def.MinSizeForArrange, resolvedSize); 2722final = Math.Max(final, definition.MinSizeForArrange); 2738final = Math.Max(final, definition.MinSizeForArrange);
System\Windows\Controls\GridSplitter.cs (5)
663_resizeData.Adorner.OffsetX = Math.Min(Math.Max(horizontalChange, _resizeData.MinChange), _resizeData.MaxChange); 667_resizeData.Adorner.OffsetY = Math.Min(Math.Max(verticalChange, _resizeData.MinChange), _resizeData.MaxChange); 801definition1Min = Math.Max(definition1Min, _resizeData.SplitterLength); 805definition2Min = Math.Max(definition2Min, _resizeData.SplitterLength); 920delta = Math.Min(Math.Max(delta, min), max);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (4)
258double childConstraintWidth = Math.Max(0.0, constraint.Width - accumulatedWidth); 295maxHeight = Math.Max(maxHeight, child.DesiredSize.Height); 302maxHeight = Math.Max(maxHeight, _paddingHeader.DesiredSize.Height); 385rect = new Rect(accumulatedWidth, 0.0, Math.Max(remainingWidth, 0.0), arrangeSize.Height);
System\Windows\Controls\GridViewRowPresenter.cs (2)
143double childConstraintWidth = Math.Max(0.0, constraint.Width - accumulatedWidth); 187maxHeight = Math.Max(maxHeight, child.DesiredSize.Height);
System\Windows\Controls\InkPresenter.cs (2)
169newSize.Width = Math.Max(newSize.Width, sizeStrokes.Width); 170newSize.Height = Math.Max(newSize.Height, sizeStrokes.Height);
System\Windows\Controls\ItemsControl.cs (2)
2771return FindFocusable((int)(ScrollHost.VerticalOffset + Math.Max(ScrollHost.ViewportHeight - 1, 0)), 2785return FindFocusable((int)(ScrollHost.HorizontalOffset + Math.Max(ScrollHost.ViewportWidth - 1, 0)),
System\Windows\Controls\MenuScrollingVisibilityConverter.cs (1)
83double percent = Math.Min(100.0, Math.Max(0.0, (verticalOffset * 100.0 / (extentHeight - viewportHeight))));
System\Windows\Controls\Primitives\BulletDecorator.cs (5)
251contentConstraint.Width = Math.Max(0.0, contentConstraint.Width - bulletSize.Width); 257Size desiredSize = new Size(bulletSize.Width + contentSize.Width, Math.Max(bulletSize.Height, contentSize.Height)); 293contentSize.Width = Math.Max(content.DesiredSize.Width, arrangeSize.Width - bullet.DesiredSize.Width); 294contentSize.Height = Math.Max(content.DesiredSize.Height, arrangeSize.Height); 299bulletOffsetY += Math.Max(0d, centerY - bulletSize.Height * 0.5d);
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (7)
116desiredSize.Width = Math.Max(desiredSize.Width, indicatorSize.Width); 117desiredSize.Height = Math.Max(desiredSize.Height, indicatorSize.Height); 124desiredSize.Width = Math.Max(desiredSize.Width, indicatorSize.Width); 125desiredSize.Height = Math.Max(desiredSize.Height, indicatorSize.Height); 148childRect.Width = Math.Max(finalSize.Width, dataGrid.CellsPanelActualWidth); 680height = Math.Max(_draggingSrcColumnHeader.RenderSize.Height, _columnHeaderDragIndicator.Height); 902columnEstimatedWidth = Math.Max(averageColumnWidth, column.MinWidth);
System\Windows\Controls\Primitives\Popup.cs (8)
2258limitSize.Height = Math.Max(0.0, Math.Max(screenBounds.Bottom - targetBounds.Bottom, targetBounds.Top - screenBounds.Top)); 2262limitSize.Width = Math.Max(0.0, Math.Max(screenBounds.Right - targetBounds.Right, targetBounds.Left - screenBounds.Left)); 2280limitSize.Width = Math.Max(0.0, Math.Max(screenBounds.Right - targetBounds.Right, targetBounds.Left - screenBounds.Left)); 2284limitSize.Height = Math.Max(0.0, Math.Max(screenBounds.Bottom - targetBounds.Bottom, targetBounds.Top - screenBounds.Top));
System\Windows\Controls\Primitives\ScrollBar.cs (3)
408newValue = Math.Min(Math.Max(newValue, Minimum), Maximum); 540double newValue = Math.Max(Value - SmallChange, Minimum); 558double newValue = Math.Max(Value - LargeChange, Minimum);
System\Windows\Controls\Primitives\ScrollContentPresenter.cs (3)
483childRect.Width = Math.Max(childRect.Width, arrangeSize.Width); 484childRect.Height = Math.Max(childRect.Height, arrangeSize.Height); 681return Math.Max(0.0, offset);
System\Windows\Controls\Primitives\TabPanel.cs (5)
204Height = Math.Max(0d, element.DesiredSize.Height - margin.Top - margin.Bottom), 205Width = Math.Max(0d, element.DesiredSize.Width - margin.Left - margin.Right) 277childSize.Height = Math.Max(0d, childSize.Height - topOffset - bottomOffset); 278childSize.Width = Math.Max(0d, childSize.Width - leftOffset - rightOffset); 409currentAverageGap = Math.Max(0d, (rowWidthLimit - currentRowWidth) / numberOfHeadersInCurrentRow); // The amout of width that should be added to justify the header
System\Windows\Controls\Primitives\ToolBarOverflowPanel.cs (5)
120_panelSize.Width = Math.Max(curLineSize.Width, _panelSize.Width); 126_panelSize.Width = Math.Max(sz.Width, _panelSize.Width); 134curLineSize.Height = Math.Max(sz.Height, curLineSize.Height); 139_panelSize.Width = Math.Max(curLineSize.Width, _panelSize.Width); 175curLineSize.Height = Math.Max(sz.Height, curLineSize.Height);
System\Windows\Controls\Primitives\ToolBarPanel.cs (6)
115panelDesiredSize.Height = Math.Max(panelDesiredSize.Height, childDesiredSize.Height); 119panelDesiredSize.Width = Math.Max(panelDesiredSize.Width, childDesiredSize.Width); 174panelDesiredSize.Height = Math.Max(panelDesiredSize.Height, childDesiredSize.Height); 179panelDesiredSize.Width = Math.Max(panelDesiredSize.Width, childDesiredSize.Width); 300rcChild.Height = Math.Max(arrangeSize.Height, child.DesiredSize.Height); 307rcChild.Width = Math.Max(arrangeSize.Width, child.DesiredSize.Width);
System\Windows\Controls\Primitives\Track.cs (6)
70return Math.Max(Minimum, Math.Min(Maximum, val)); 462double viewportSize = Math.Max(0.0, ViewportSize); 555double range = Math.Max(0.0, Maximum - min); 594double range = Math.Max(0.0, Maximum - min); 599double extent = Math.Max(0.0, range) + viewportSize; 625thumbLength = Math.Max(thumbMinLength, thumbLength);
System\Windows\Controls\ScrollViewer.cs (3)
400get { return Math.Max(0.0, ExtentWidth - ViewportWidth); } 408get { return Math.Max(0.0, ExtentHeight - ViewportHeight); } 1798double newUnused = Math.Max(unused + delta, 0);
System\Windows\Controls\SinglePageViewer.cs (5)
702Math.Max(ia.OriginWidth, pagePadding.Left), 703Math.Max(ia.OriginHeight, pagePadding.Top), 704Math.Max(ia.MediaSizeWidth - (ia.OriginWidth + ia.ExtentWidth), pagePadding.Right), 705Math.Max(ia.MediaSizeHeight - (ia.OriginHeight + ia.ExtentHeight), pagePadding.Bottom)); 755SetCurrentValueInternal(ZoomProperty, Math.Max(Zoom - ZoomIncrement, MinZoom));
System\Windows\Controls\Slider.cs (10)
987valueToSize = Math.Max(0.0, (trackSize.Width - thumbSize.Width) / range); 993Canvas.SetLeft(rangeElement, (thumbSize.Width * 0.5) + Math.Max(Maximum - SelectionEnd, 0) * valueToSize); 997Canvas.SetLeft(rangeElement, (thumbSize.Width * 0.5) + Math.Max(SelectionStart - Minimum, 0) * valueToSize); 1009valueToSize = Math.Max(0.0, (trackSize.Height - thumbSize.Height) / range); 1015Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(SelectionStart - Minimum, 0) * valueToSize); 1019Canvas.SetTop(rangeElement, (thumbSize.Height * 0.5) + Math.Max(Maximum - SelectionEnd,0) * valueToSize); 1052valueToSize = Math.Max(0.0, (trackSize.Width - thumbSize.Width) / range); 1076valueToSize = Math.Max(0.0, (trackSize.Height - thumbSize.Height) / range); 1205double next = SnapToTick(Math.Max(this.Minimum, Math.Min(this.Maximum, value + direction))); 1401this.SetCurrentValueInternal(ValueProperty, Math.Max(this.Minimum, Math.Min(this.Maximum, snappedValue)));
System\Windows\Controls\Stack.cs (8)
593stackDesiredSize.Height = Math.Max(stackDesiredSize.Height, childDesiredSize.Height); 598stackDesiredSize.Width = Math.Max(stackDesiredSize.Width, childDesiredSize.Width); 658offset.Y = Math.Max(0, Math.Min(offset.Y, extent.Height - viewport.Height)); 666offset.X = Math.Max(0, Math.Min(offset.X, extent.Width - viewport.Width)); 750rcChild.Height = Math.Max(arrangeSize.Height, child.DesiredSize.Height); 757rcChild.Width = Math.Max(arrangeSize.Width, child.DesiredSize.Width); 891double left = Math.Max(targetRectOffset, minPhysicalOffset); 892targetRectSize = Math.Max(Math.Min(targetRectSize + targetRectOffset, minPhysicalOffset + viewportSize) - left, 0);
System\Windows\Controls\StickyNote.cs (2)
1111horizontalChange = Math.Min(Math.Max(minBoundary.X, horizontalChange), maxBoundary.X); 1112verticalChange = Math.Min(Math.Max(minBoundary.Y, verticalChange), maxBoundary.Y);
System\Windows\Controls\TextBlock.cs (10)
1259Size contentSize = new Size(Math.Max(0.0, constraint.Width - (padding.Left + padding.Right)), 1260Math.Max(0.0, constraint.Height - (padding.Top + padding.Bottom))); 1299desiredSize.Width = Math.Max(desiredSize.Width, line.GetCollapsedWidth()); 1522double contentBottom = Math.Max(0.0, RenderSize.Height - Padding.Bottom); 1956Size contentSize = new Size(Math.Max(0.0, _referenceSize.Width - (padding.Left + padding.Right)), 1957Math.Max(0.0, _referenceSize.Height - (padding.Top + padding.Bottom))); 3096Size contentSize = new Size(Math.Max(0.0, computedSize.Width - (padding.Left + padding.Right)), 3097Math.Max(0.0, computedSize.Height - (padding.Top + padding.Bottom))); 3146double contentBottom = Math.Max(0.0, RenderSize.Height - Padding.Bottom); 3176width = Math.Max(0.0, width - paddingWidth);
System\Windows\Controls\ToolBar.cs (2)
542extraLength = Math.Max(0.0, desiredSize.Width - toolBarPanel.DesiredSize.Width + margin.Left + margin.Right); 546extraLength = Math.Max(0.0, desiredSize.Height - toolBarPanel.DesiredSize.Height + margin.Top + margin.Bottom);
System\Windows\Controls\ToolBarTray.cs (5)
380bandThickness = Math.Max(bandThickness, fHorizontal ? toolBar.DesiredSize.Height : toolBar.DesiredSize.Width); 395toolBarTrayDesiredSize.Width = Math.Max(toolBarTrayDesiredSize.Width, bandLength); 400toolBarTrayDesiredSize.Height = Math.Max(toolBarTrayDesiredSize.Height, bandLength); 788currentToolBar.Width = Math.Max(currentToolBar.MinLength, currentToolBar.RenderSize.Width - toolBarOffset + position); 790currentToolBar.Height = Math.Max(currentToolBar.MinLength, currentToolBar.RenderSize.Height - toolBarOffset + position);
System\Windows\Controls\VirtualizingStackPanel.cs (109)
2615double spanBeforeViewport = Math.Max(isHorizontal ? viewport.X : viewport.Y, 0.0); 3369arrangeLength = Math.Max(isHorizontal ? arrangeSize.Height : arrangeSize.Width, arrangeLength); 4738pixelSizeBeforeViewport = Math.Max(pixelSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X)); 4742logicalSizeBeforeViewport = Math.Max(logicalSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X)); 4774extendedViewport.Width = Math.Max(extendedViewport.Width + extendedViewport.X, 0.0); 4785extendedViewport.Width = Math.Max(_scrollData._extent.Width - extendedViewport.X, 0.0); 4814extendedViewport.Width = Math.Max(extendedViewport.Width / approxSizeOfLogicalUnit + extendedViewport.X, 0.0) * approxSizeOfLogicalUnit; 4825extendedViewport.Width = Math.Max(_scrollData._extent.Width - extendedViewport.X, 0.0) * approxSizeOfLogicalUnit; 4854pixelSizeBeforeViewport = Math.Max(pixelSizeBeforeViewport, Math.Abs(_viewport.Y - _extendedViewport.Y)); 4858logicalSizeBeforeViewport = Math.Max(logicalSizeBeforeViewport, Math.Abs(_viewport.Y - _extendedViewport.Y)); 4890extendedViewport.Height = Math.Max(extendedViewport.Height + extendedViewport.Y, 0.0); 4901extendedViewport.Height = Math.Max(_scrollData._extent.Height - extendedViewport.Y, 0.0); 4930extendedViewport.Height = Math.Max(extendedViewport.Height / approxSizeOfLogicalUnit + extendedViewport.Y, 0.0) * approxSizeOfLogicalUnit; 4941extendedViewport.Height = Math.Max(_scrollData._extent.Height - extendedViewport.Y, 0.0) * approxSizeOfLogicalUnit; 4953double factor = Math.Max(1.0, isHorizontal ? extendedViewport.Width / viewport.Width : extendedViewport.Height / viewport.Height); 5066viewport.Width = Math.Max(viewport.Width - sizeAfterStartViewportEdge, 0); 5070cacheBeforeSize = Math.Max(cacheBeforeSize - sizeBeforeStartViewportEdge, 0); 5074cacheBeforeSize = Math.Max(cacheBeforeSize - Math.Floor(logicalSize.Width * sizeBeforeStartViewportEdge / pixelSize.Width), 0); 5101viewport.Width = Math.Max(0, parentViewport.Width - pixelSize.Width); 5116cacheAfterSize = Math.Max(cacheAfterSize - sizeAfterEndViewportEdge, 0); 5120cacheAfterSize = Math.Max(cacheAfterSize - Math.Floor(logicalSize.Width * sizeAfterEndViewportEdge / pixelSize.Width), 0); 5132cacheAfterSize = Math.Max(cacheAfterSize - pixelSize.Width, 0); 5136cacheAfterSize = Math.Max(cacheAfterSize - logicalSize.Width, 0); 5165viewport.Height = Math.Max(viewport.Height - sizeAfterStartViewportEdge, 0); 5169cacheBeforeSize = Math.Max(cacheBeforeSize - sizeBeforeStartViewportEdge, 0); 5173cacheBeforeSize = Math.Max(cacheBeforeSize - Math.Floor(logicalSize.Height * sizeBeforeStartViewportEdge / pixelSize.Height), 0); 5200viewport.Height = Math.Max(0, parentViewport.Height - pixelSize.Height); 5215cacheAfterSize = Math.Max(cacheAfterSize - sizeAfterEndViewportEdge, 0); 5219cacheAfterSize = Math.Max(cacheAfterSize - Math.Floor(logicalSize.Height * sizeAfterEndViewportEdge / pixelSize.Height), 0); 5231cacheAfterSize = Math.Max(cacheAfterSize - pixelSize.Height, 0); 5235cacheAfterSize = Math.Max(cacheAfterSize - logicalSize.Height, 0); 5300cacheBeforeSize = Math.Max(0, cacheBeforeSize - parentViewport.X); 5305viewport.Width = Math.Max(0, viewport.Width + viewport.X); 5325cacheBeforeSize = Math.Max(0, cacheBeforeSize - inset.Right); 5329cacheBeforeSize = Math.Max(0, cacheBeforeSize - 1); 5344viewport.Width = Math.Max(0, viewport.Width - inset.Left); 5355cacheAfterSize = Math.Max(0, cacheAfterSize - (inset.Left - viewport.Width)); 5372cacheAfterSize = Math.Max(0, cacheAfterSize - inset.Left); 5376cacheAfterSize = Math.Max(0, cacheAfterSize - 1); 5403cacheBeforeSize = Math.Max(0, cacheBeforeSize - parentViewport.Y); 5408viewport.Height = Math.Max(0, viewport.Height + viewport.Y); 5428cacheBeforeSize = Math.Max(0, cacheBeforeSize - inset.Bottom); 5432cacheBeforeSize = Math.Max(0, cacheBeforeSize - 1); 5447viewport.Height = Math.Max(0, viewport.Height - inset.Top); 5458cacheAfterSize = Math.Max(0, cacheAfterSize - (inset.Top - viewport.Height)); 5475cacheAfterSize = Math.Max(0, cacheAfterSize - inset.Top); 5479cacheAfterSize = Math.Max(0, cacheAfterSize - 1); 5535double spanBeforeViewport = Math.Max(isHorizontal ? viewport.X : viewport.Y, 0.0); 6707childViewport.Width = Math.Max(childViewport.Width - stackPixelSizeInViewport.Width, 0.0); 6712childViewport.Width = Math.Max(childViewport.Width - stackPixelSizeInViewport.Width, 0.0); 6720Math.Max(parentCacheSize.CacheBeforeViewport - stackLogicalSizeInCacheBeforeViewport.Width, 0.0), 6723Math.Max(parentCacheSize.CacheAfterViewport - stackLogicalSizeInCacheAfterViewport.Width, 0.0)); 6731Math.Max(parentCacheSize.CacheBeforeViewport - stackPixelSizeInCacheBeforeViewport.Width, 0.0), 6734Math.Max(parentCacheSize.CacheAfterViewport - stackPixelSizeInCacheAfterViewport.Width, 0.0)); 6753childViewport.Height = Math.Max(childViewport.Height - stackPixelSizeInViewport.Height, 0.0); 6758childViewport.Height = Math.Max(childViewport.Height - stackPixelSizeInViewport.Height, 0.0); 6766Math.Max(parentCacheSize.CacheBeforeViewport - stackLogicalSizeInCacheBeforeViewport.Height, 0.0), 6769Math.Max(parentCacheSize.CacheAfterViewport - stackLogicalSizeInCacheAfterViewport.Height, 0.0)); 6777Math.Max(parentCacheSize.CacheBeforeViewport - stackPixelSizeInCacheBeforeViewport.Height, 0.0), 6780Math.Max(parentCacheSize.CacheAfterViewport - stackPixelSizeInCacheAfterViewport.Height, 0.0)); 6887childLogicalSize.Width = Math.Max(itemDesiredSizes.LogicalSize.Width, logicalHeaderSize.Width); 6892childLogicalSize.Height = Math.Max(itemDesiredSizes.LogicalSize.Height, logicalHeaderSize.Height); 7091Size frontPixelSize = isHorizontal ? new Size(Math.Max(inset.Left,0), childDesiredSize.Height) 7092: new Size(childDesiredSize.Width, Math.Max(inset.Top, 0)); 7105Size backPixelSize = isHorizontal ? new Size(Math.Max(inset.Right,0), childDesiredSize.Height) 7106: new Size(childDesiredSize.Width, Math.Max(inset.Bottom,0)); 7119adjustedChildViewport.Width = Math.Max(0, adjustedChildViewport.Width - childPixelSizeInViewport.Width); 7125adjustedChildViewport.Height = Math.Max(0, adjustedChildViewport.Height - childPixelSizeInViewport.Height); 7210pixelSizeBeforeViewport = DoubleUtil.LessThan(childViewport.X, childPixelSize.Width) ? Math.Max(childViewport.X, 0.0) : childPixelSize.Width; 7212pixelSizeAfterViewport = Math.Max(childPixelSize.Width - pixelSizeInViewport - pixelSizeBeforeViewport, 0.0); // Please note that due to rounding errors this subtraction can lead to negative values. Hence the Math.Max call 7266double childPixelHeightInViewport = Math.Min(childViewport.Height, childPixelSize.Height - Math.Max(childViewport.Y, 0.0)); 7269childPixelSizeInViewport.Height = Math.Max(childPixelSizeInViewport.Height, childPixelHeightInViewport); 7271childPixelSizeInCacheBeforeViewport.Height = Math.Max(childPixelSizeInCacheBeforeViewport.Height, childPixelHeightInViewport); 7273childPixelSizeInCacheAfterViewport.Height = Math.Max(childPixelSizeInCacheAfterViewport.Height, childPixelHeightInViewport); 7276childLogicalSizeInViewport.Height = Math.Max(childLogicalSizeInViewport.Height, childLogicalSize.Height); 7278childLogicalSizeInCacheBeforeViewport.Height = Math.Max(childLogicalSizeInCacheBeforeViewport.Height, childLogicalSize.Height); 7280childLogicalSizeInCacheAfterViewport.Height = Math.Max(childLogicalSizeInCacheAfterViewport.Height, childLogicalSize.Height); 7302pixelSizeBeforeViewport = DoubleUtil.LessThan(childViewport.Y, childPixelSize.Height) ? Math.Max(childViewport.Y, 0.0) : childPixelSize.Height; 7304pixelSizeAfterViewport = Math.Max(childPixelSize.Height - pixelSizeInViewport - pixelSizeBeforeViewport, 0.0); // Please note that due to rounding errors this subtraction can lead to negative values. Hence the Math.Max call 7358double childPixelWidthInViewport = Math.Min(childViewport.Width, childPixelSize.Width - Math.Max(childViewport.X, 0.0)); 7361childPixelSizeInViewport.Width = Math.Max(childPixelSizeInViewport.Width, childPixelWidthInViewport); 7363childPixelSizeInCacheBeforeViewport.Width = Math.Max(childPixelSizeInCacheBeforeViewport.Width, childPixelWidthInViewport); 7365childPixelSizeInCacheAfterViewport.Width = Math.Max(childPixelSizeInCacheAfterViewport.Width, childPixelWidthInViewport); 7368childLogicalSizeInViewport.Width = Math.Max(childLogicalSizeInViewport.Width, childLogicalSize.Width); 7370childLogicalSizeInCacheBeforeViewport.Width = Math.Max(childLogicalSizeInCacheBeforeViewport.Width, childLogicalSize.Width); 7372childLogicalSizeInCacheAfterViewport.Width = Math.Max(childLogicalSizeInCacheAfterViewport.Width, childLogicalSize.Width); 7415sz1.Height = Math.Max(sz1.Height, sz2.Height); 7420sz1.Width = Math.Max(sz1.Width, sz2.Width); 7470childSize = new Size(Math.Max(headerDesiredSizes.PixelSize.Width, itemDesiredSizes.PixelSize.Width), 7475childSize = new Size(Math.Max(headerDesiredSizes.LogicalSize.Width, itemDesiredSizes.LogicalSize.Width), 7643Math.Max(1, itemDesiredSizes.LogicalSize.Height)) 7644: new Size(Math.Max(1, itemDesiredSizes.LogicalSize.Width), 7785Math.Max(uniformOrAverageContainerPixelSize, dpiScale), // don't round down to 0 8458rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height); 8483previousChildSize.Width = Math.Max(previousChildSize.Width, pixelHeaderSize.Width); 8490rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width); 8515previousChildSize.Height = Math.Max(previousChildSize.Height, pixelHeaderSize.Height); 8545rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height); 8551rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width); 8589rcChild.Height = Math.Max(arrangeLength, childDesiredSize.Height); 8642rcChild.Width = Math.Max(arrangeLength, childDesiredSize.Width); 9645_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height); 9672_scrollData._maxDesiredSize.Width = Math.Max(_scrollData._maxDesiredSize.Width, stackPixelSize.Width); 10494_scrollData._maxDesiredSize.Height = Math.Max(_scrollData._maxDesiredSize.Height, stackPixelSize.Height); 10521_scrollData._maxDesiredSize.Width = Math.Max(_scrollData._maxDesiredSize.Width, stackPixelSize.Width); 11165double visibleStart = Math.Max(start, 0); 11166double visibleEnd = Math.Max(Math.Min(end, viewportSize), visibleStart); 11257maxChildLength = Math.Max(maxChildLength, childSize.Height); 11261maxChildLength = Math.Max(maxChildLength, childSize.Width);
System\Windows\Controls\WrapPanel.cs (5)
242panelSize.U = Math.Max(curLineSize.U, panelSize.U); 248panelSize.U = Math.Max(sz.U, panelSize.U); 256curLineSize.V = Math.Max(sz.V, curLineSize.V); 261panelSize.U = Math.Max(curLineSize.U, panelSize.U); 316curLineSize.V = Math.Max(sz.V, curLineSize.V);
System\windows\Documents\CaretElement.cs (2)
406scroller.ScrollToVerticalOffset(Math.Max(0, scroller.VerticalOffset - deltaToScroll - scrollerHeight / 4)); 423scroller.ScrollToHorizontalOffset(Math.Max(0, scroller.HorizontalOffset - deltaToScroll - scrollerWidth / 4));
System\Windows\Documents\FixedPageStructure.cs (2)
156double absVerDistance = Math.Max(0, (pt.Y > lineResult.LayoutBox.Y) ? (pt.Y - lineResult.LayoutBox.Bottom) : (lineResult.LayoutBox.Y - pt.Y)); 157double absHorDistance = Math.Max(0, (pt.X > lineResult.LayoutBox.X) ? (pt.X - lineResult.LayoutBox.Right) : (lineResult.LayoutBox.X - pt.X));
System\Windows\Documents\FixedTextBuilder.cs (1)
862double maxHeight = Math.Max(box1.Height, box2.Height);
System\Windows\Documents\FixedTextView.cs (2)
831double horizontalDistance = Math.Max(0, (transformedPt.X > alignmentRect.X) ? (transformedPt.X - alignmentRect.Right) : (alignmentRect.X - transformedPt.X)); 832double verticalDistance = Math.Max(0, (transformedPt.Y > alignmentRect.Y) ? (transformedPt.Y - alignmentRect.Bottom) : (alignmentRect.Y - transformedPt.Y));
System\Windows\Documents\Glyphs.cs (2)
142Math.Max(0, designRect.Right), 143Math.Max(0, designRect.Bottom)
System\Windows\Documents\ImmComposition.cs (2)
651milPointBottomRight = new Point(Math.Max(rectStart.Left, rectEnd.Left), Math.Max(rectStart.Bottom, rectEnd.Bottom));
System\Windows\Documents\Table.cs (1)
189get { return Math.Max(CellSpacing, 0); }
System\Windows\Documents\TextRangeEdit.cs (1)
2367double retValue = Math.Max(_lowerBound, value);
System\Windows\Documents\TextRangeEditTables.cs (3)
1711_dxr = Math.Max(_dxr, 0.0); 1734xPosAdorner = Math.Max(xPosAdorner, _columnRect.Left - this.LeftDragMax); 1746dx = Math.Max(dx, - this.LeftDragMax);
System\Windows\Documents\TextStore.cs (2)
986milPointBottomRight = new Point(Math.Max(rectPrev.Left, rectCur.Left), Math.Max(rectPrev.Bottom, rectCur.Bottom));
System\Windows\FrameworkElement.cs (28)
4045maxHeight = Math.Max(Math.Min(height, maxHeight), minHeight); 4048minHeight = Math.Max(Math.Min(maxHeight, height), minHeight); 4055maxWidth = Math.Max(Math.Min(width, maxWidth), minWidth); 4058minWidth = Math.Max(Math.Min(maxWidth, width), minWidth); 4326Math.Max(availableSize.Width - marginWidth, 0), 4327Math.Max(availableSize.Height - marginHeight, 0)); 4375frameworkAvailableSize.Width = Math.Max(mm.minWidth, Math.Min(frameworkAvailableSize.Width, mm.maxWidth)); 4376frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight)); 4389Math.Max(desiredSize.Width, mm.minWidth), 4390Math.Max(desiredSize.Height, mm.minHeight)); 4454ltd?.TransformedUnroundedDS = new Size(Math.Max(0, clippedDesiredWidth), Math.Max(0, clippedDesiredHeight)); 4500return new Size(Math.Max(0, clippedDesiredWidth), Math.Max(0, clippedDesiredHeight)); 4562arrangeSize.Width = Math.Max(0, arrangeSize.Width - marginWidth); 4563arrangeSize.Height = Math.Max(0, arrangeSize.Height - marginHeight); 4572transformedUnroundedDS.Width = Math.Max(0, transformedUnroundedDS.Width - marginWidth); 4573transformedUnroundedDS.Height = Math.Max(0, transformedUnroundedDS.Height- marginHeight); 4582unclippedDesiredSize = new Size(Math.Max(0, this.DesiredSize.Width - marginWidth), 4583Math.Max(0, this.DesiredSize.Height - marginHeight)); 4588unclippedDesiredSize.Width = Math.Max(transformedUnroundedDS.Width, unclippedDesiredSize.Width); 4589unclippedDesiredSize.Height = Math.Max(transformedUnroundedDS.Height, unclippedDesiredSize.Height); 4676double effectiveMaxWidth = Math.Max(unclippedDesiredSize.Width, mm.maxWidth); 4683double effectiveMaxHeight = Math.Max(unclippedDesiredSize.Height, mm.maxHeight); 4747Size clientSize = new Size(Math.Max(0, finalRect.Width - marginWidth), 4748Math.Max(0, finalRect.Height - marginHeight)); 4917Size clippingSize = new Size(Math.Max(0, layoutSlotSize.Width - marginWidth), 4918Math.Max(0, layoutSlotSize.Height - marginHeight));
System\Windows\Input\KeyboardNavigation.cs (4)
2506rect.Height = Math.Min(Math.Max(before, 0.0d), rect.Height); 2510double height = Math.Min(Math.Max(after, 0.0d), rect.Height); 2658endRange = Math.Max(endRange, _horizontalBaseline); 2679endRange = Math.Max(endRange, _verticalBaseline);
System\Windows\Shapes\Ellipse.cs (3)
92width = Math.Max(width, height); 115Math.Max(0, finalSize.Width - penThickness), // Width 116Math.Max(0, finalSize.Height - penThickness)); // Height
System\Windows\Shapes\Rectangle.cs (3)
145width = Math.Max(width, height); 169Math.Max(0, finalSize.Width - penThickness), // Width 170Math.Max(0, finalSize.Height - penThickness)); // Height
System\Windows\Shapes\Shape.cs (4)
583xScale = Math.Max(availableSize.Width - strokeThickness, 0); 584yScale = Math.Max(availableSize.Height - strokeThickness, 0); 711return new Size(Math.Max(bounds.Right, 0), 712Math.Max(bounds.Bottom, 0));
System\Windows\Shell\TaskbarItemInfo.cs (1)
105progressValue = Math.Max(progressValue, 0);
System\Windows\Shell\WindowChromeWorker.cs (4)
977deviceGlassThickness.Top = Math.Max(0, deviceGlassThickness.Top); 982deviceGlassThickness.Left = Math.Max(0, deviceGlassThickness.Left); 987deviceGlassThickness.Bottom = Math.Max(0, deviceGlassThickness.Bottom); 992deviceGlassThickness.Right = Math.Max(0, deviceGlassThickness.Right);
System\Windows\Window.cs (18)
1813frameworkAvailableSize.Width = Math.Max(mm.minWidth, Math.Min(frameworkAvailableSize.Width, mm.maxWidth)); 1814frameworkAvailableSize.Height = Math.Max(mm.minHeight, Math.Min(frameworkAvailableSize.Height, mm.maxHeight)); 1821Math.Max(desiredSize.Width, mm.minWidth), 1822Math.Max(desiredSize.Height, mm.minHeight)); 1843arrangeBounds.Width = Math.Max(mm.minWidth, Math.Min(arrangeBounds.Width, mm.maxWidth)); 1844arrangeBounds.Height = Math.Max(mm.minHeight, Math.Min(arrangeBounds.Height, mm.maxHeight)); 1879Width = Math.Max(0.0, arrangeBounds.Width - frameSize.Width), 1880Height = Math.Max(0.0, arrangeBounds.Height - frameSize.Height) 3415Width = ((constraint.Width == Double.PositiveInfinity) ? Double.PositiveInfinity : Math.Max(0.0, (constraint.Width - frameSize.Width))), 3416Height = ((constraint.Height == Double.PositiveInfinity) ? Double.PositiveInfinity : Math.Max(0.0, (constraint.Height - frameSize.Height))) 3461maxWidthDeviceUnits = Math.Max(_trackMaxWidthDeviceUnits, _windowMaxWidthDeviceUnits); 3462maxHeightDeviceUnits = Math.Max(_trackMaxHeightDeviceUnits, _windowMaxHeightDeviceUnits); 3471mm.minWidth = Math.Max(this.MinWidth, minSizeLogicalUnits.X); 3493mm.minHeight = Math.Max(this.MinHeight, minSizeLogicalUnits.Y); 4717_windowMaxWidthDeviceUnits = Math.Max(_windowMaxWidthDeviceUnits, windowSize.X); 4718_windowMaxHeightDeviceUnits = Math.Max(_windowMaxHeightDeviceUnits, windowSize.Y); 7606return new Size(Math.Max(0.0, pt.X), Math.Max(0.0, pt.Y));
PresentationFramework.Aero (8)
Microsoft\Windows\Themes\ButtonChrome.cs (2)
452Width = Math.Max(0d, finalSize.Width - 4.0), 453Height = Math.Max(0d, finalSize.Height - 4.0)
Microsoft\Windows\Themes\ScrollChrome.cs (1)
473bounds.Width = Math.Max(0.0, bounds.Width - 1.0);
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
192childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 197childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 232double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 233double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 299return Math.Max(0.0, d);
PresentationFramework.Aero2 (8)
Microsoft\Windows\Themes\ButtonChrome.cs (2)
452Width = Math.Max(0d, finalSize.Width - 4.0), 453Height = Math.Max(0d, finalSize.Height - 4.0)
Microsoft\Windows\Themes\ScrollChrome.cs (1)
473bounds.Width = Math.Max(0.0, bounds.Width - 1.0);
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
192childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 197childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 232double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 233double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 299return Math.Max(0.0, d);
PresentationFramework.AeroLite (5)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
192childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 197childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 232double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 233double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 299return Math.Max(0.0, d);
PresentationFramework.Classic (7)
Microsoft\Windows\Themes\ClassicBorderDecorator.cs (2)
601Math.Max(0.0, rt.Width - thick.Left - thick.Right), 602Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
192childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 197childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 232double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 233double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 299return Math.Max(0.0, d);
PresentationFramework.Luna (12)
Microsoft\Windows\Themes\ButtonChrome.cs (2)
363Width = Math.Max(0d, finalSize.Width - sideThickness2), 364Height = Math.Max(0d, finalSize.Height - sideThickness2)
Microsoft\Windows\Themes\ScrollChrome.cs (1)
305bounds.Width = Math.Max(0.0, bounds.Width - 1.0);
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\BulletChrome.cs (4)
210Math.Max(0, bounds.Width - thickness.Left - thickness.Right), 211Math.Max(0, bounds.Height - thickness.Top - thickness.Bottom)); 452Math.Max(0.0, rt.Width - thick.Left - thick.Right), 453Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
192childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 197childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 232double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 233double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 299return Math.Max(0.0, d);
PresentationFramework.Royale (11)
Microsoft\Windows\Themes\ButtonChrome.cs (2)
321Width = Math.Max(0d, finalSize.Width - sideThickness2), 322Height = Math.Max(0d, finalSize.Height - sideThickness2)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\BulletChrome.cs (4)
210Math.Max(0, bounds.Width - thickness.Left - thickness.Right), 211Math.Max(0, bounds.Height - thickness.Top - thickness.Bottom)); 452Math.Max(0.0, rt.Width - thick.Left - thick.Right), 453Math.Max(0.0, rt.Height - thick.Top - thick.Bottom));
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (5)
192childWidth = Math.Max(0.0, childWidth - padding.Left - padding.Right); 197childHeight = Math.Max(0.0, childHeight - padding.Top - padding.Bottom); 232double childWidth = Math.Max(0.0, arrangeSize.Width - padding.Left - padding.Right); 233double childHeight = Math.Max(0.0, arrangeSize.Height - padding.Top - padding.Bottom); 299return Math.Max(0.0, d);
ReachFramework (13)
AlphaFlattener\BrushProxy.cs (5)
1924stopDistance = Math.Max(b.RadiusX, b.RadiusY) * (second.Offset - first.Offset); 3740max = Math.Max(max, offset); 3895return (int)Math.Ceiling(Math.Max(5, step)); // At least five. Radials look bad with less steps. 4392maxt = Math.Max(maxt, one); 4400maxt = Math.Max(maxt, two);
AlphaFlattener\DrawingContext.cs (1)
661return 512 + Configuration.RasterizationCost(Math.Max(bounds.Width, bounds.Height));
AlphaFlattener\ImageProxy.cs (2)
480int x0 = (int)Math.Max(Math.Floor(bounds.Left), 0); 481int y0 = (int)Math.Max(Math.Floor(bounds.Top), 0);
AlphaFlattener\Utility.cs (2)
223return Math.Max(GetScaleX(trans), GetScaleY(trans)); 1687scale = Math.Max(viewport.Width / viewbox.Width, viewport.Height / viewbox.Height);
Serialization\VisualSerializer.cs (3)
472scalex = Math.Max(dstwidth / srcwidth, dstheight / srcheight); 926WriteAttr("StrokeMiterLimit", Math.Max(1.0, pen.MiterLimit)); 2258WriteAttr("Opacity", Math.Min(Math.Max( opacity, 0.0),1.0));
Roslyn.Diagnostics.Analyzers (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.FieldMetricData.cs (2)
47double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 48double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.MethodMetricData.cs (2)
58double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 59double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (2)
175double logAvgComputationalComplexityVolume = Math.Max(0.0, Math.Log(avgComputationalComplexityVolume)); //avoid Log(0) = -Infinity 176double logAvgLinesOfCode = Math.Max(0.0, Math.Log(avgEffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
437=> Length * Math.Max(0.0, Math.Log(Vocabulary, 2));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
37maintIndex = Math.Max(0.0, maintIndex);
Roslyn.VisualStudio.DiagnosticsWindow (1)
PerfMargin\StatusIndicator.xaml.cs (1)
65this.clipScale.ScaleX = Math.Max(this.clipScale.ScaleX, MinimumScale);
System.Data.Common (1)
System\Data\Common\DoubleStorage.cs (1)
124max = Math.Max(_values[record], max);
System.Diagnostics.Process (1)
System\Diagnostics\ProcessWaitState.Unix.cs (1)
427(int)Math.Max(millisecondsTimeout - Stopwatch.GetElapsedTime(startTime).TotalMilliseconds, 0);
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (1)
114long heartBeatInterval = (long)Math.Max(1000, Math.Min(_settings._keepAlivePingDelay.TotalMilliseconds, _settings._keepAlivePingTimeout.TotalMilliseconds) / 4);
System.Private.CoreLib (6)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
965public static double Max(double x, double y) => Math.Max(x, y);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.HillClimbing.cs (5)
235throughputErrorEstimate = Math.Max(throughputErrorEstimate, (GetWaveComponent(_samples, sampleCount, adjacentPeriod2) / averageThroughput).Abs()); 271double noiseForConfidence = Math.Max(_averageThroughputNoise, throughputErrorEstimate); 288double move = Math.Min(1.0, Math.Max(-1.0, ratio.Real)); 293move *= Math.Min(1.0, Math.Max(0.0, confidence)); 333_currentControlSetting = Math.Max(minThreads, _currentControlSetting);
System.Windows.Controls.Ribbon (57)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonContextualTabGroupsPanel.cs (3)
87desiredSize.Height = Math.Max(desiredSize.Height, tabGroupHeader.DesiredSize.Height); 104double width = Math.Max(tabGroupHeader.ArrangeWidth,0); 109tabGroupHeader.Arrange(new Rect(startX, y, width, Math.Max(0.0, height - 1)));
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGalleryCategoriesPanel.cs (6)
386maxChildWidth = Math.Max(maxChildWidth, childSize.Width); 387maxChildHeight = Math.Max(maxChildHeight, childSize.Height); 461stackDesiredSize.Width = Math.Max(stackDesiredSize.Width, childDesiredSize.Width); 492viewportOffsetY = Math.Max(viewportOffsetY - logicalVisibleSpace, 0.0); 495offset.X = Math.Max(0, Math.Min(offset.X, extent.Width - viewport.Width)); 601rcChild.Width = Math.Max(finalSize.Width, child.DesiredSize.Width);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGalleryItemsPanel.cs (6)
340maxColumnWidth = Math.Max(maxColumnWidth, childSize.Width); 341maxItemHeight = Math.Max(maxItemHeight, childSize.Height); 375arrangeWidth = Math.Max(availableSize.Width / columnCount, maxColumnWidth); 391_arrangeWidth = Math.Max(availableSize.Width / columnCount, maxColumnWidth); 413maxRowHeight = Math.Max(maxRowHeight, childSize.Height); 575maxRowHeight = Math.Max(maxRowHeight, children[i].DesiredSize.Height);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupItemsPanel.cs (11)
82remainingHeightInColumn = Math.Max(0, finalSize.Height - childDesiredSize.Height); 104columnWidth = Math.Max(columnWidth, arrangeWidth); 135maxStarColumnWidth = Math.Max(maxStarColumnWidth, child.MaxWidth); 140maxStarColumnWidth = Math.Max(maxStarColumnWidth, Math.Min(child.MaxWidth, child.DesiredSize.Width)); 222desiredHeight = Math.Min(Math.Max(desiredHeight, columnHeight), availableSize.Height); 247columnWidth = Math.Max(columnWidth, GetStarChildMinWidth(child as FrameworkElement, ref maxStarColumnWidth)); 251columnWidth = Math.Max(columnWidth, childDesiredSize.Width); 252maxStarColumnWidth = Math.Max(maxStarColumnWidth, columnWidth); 257desiredHeight = Math.Min(Math.Max(desiredHeight, columnHeight), availableSize.Height); 357columnDesiredWidth = Math.Max(columnDesiredWidth, child.DesiredSize.Width); 374desiredWidth += Math.Max((columnDesiredWidth - starLayoutInfo.RequestedStarMinWidth), 0);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupsPanel.cs (1)
155remainingSpace = Math.Max(0, remainingSpace - 1);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonMenuItemsPanel.cs (3)
137maxChildWidth = Math.Max(availableSize.Width, maxChildWidth); 154double surplusHeight = Math.Max(remainingHeight, 0.0) / _registeredStarLayoutProviders.Count; 171desiredSize.Width = Math.Max(starLayoutTarget.DesiredSize.Width, desiredSize.Width);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonQuickAccessToolBarOverflowPanel.cs (2)
30panelDesiredSize.Height = Math.Max(panelDesiredSize.Height, child.DesiredSize.Height); 49rcChild.Height = Math.Max(finalSize.Height, child.DesiredSize.Height);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonQuickAccessToolBarPanel.cs (2)
216panelDesiredSize.Height = Math.Max(panelDesiredSize.Height, childDesiredSize.Height); 281rcChild.Height = Math.Max(finalSize.Height, child.DesiredSize.Height);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonScrollButtonVisibilityConverter.cs (1)
89double percent = Math.Min(100.0, Math.Max(0.0, (offset * 100.0 / (extent - viewport))));
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTabHeadersPanel.cs (9)
89_separatorOpacity = Math.Max(0.0, reducePaddingRegularTabHeader * 0.2); 395desiredSize.Height = Math.Max(desiredSize.Height, ribbonTabHeader.DesiredSize.Height); 412desiredSize.Height = Math.Max(desiredSize.Height, child.DesiredSize.Height); 443double leftPadding = Math.Max(0, ribbonTabHeader.DefaultPadding.Left - (isContextualTab ? reducePaddingContextualTabHeader : reducePaddingRegularTabHeader)); 444double rightPadding = Math.Max(0, ribbonTabHeader.DefaultPadding.Right - (isContextualTab ? reducePaddingContextualTabHeader : reducePaddingRegularTabHeader)); 450desiredSize.Height = Math.Max(desiredSize.Height, ribbonTabHeader.DesiredSize.Height); 461desiredSize.Height = Math.Max(desiredSize.Height, child.DesiredSize.Height); 526return Math.Max(_tabHeaderMinWidth, maxTabHeaderWidth); 1048return Math.Max(0.0, offset);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTabsPanel.cs (3)
41returnSize = new Size(Math.Max(returnSize.Width, childSize.Width), Math.Max(returnSize.Height, childSize.Height)); 300return Math.Max(0.0, offset);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTitlePanel.cs (9)
85groupHeaderItemsControl.Measure(new Size(Math.Max(endContextualTabX - startContextualTabX, 0), availableSize.Height)); 87desiredSize.Height = Math.Max(desiredSize.Height, groupHeaderItemsControl.DesiredSize.Height); 122availableToQat = Math.Max(availableToQat, 0); 129desiredSize.Height = Math.Max(desiredSize.Height, qat.DesiredSize.Height); 134endContextualTabX = Math.Max(endContextualTabX, availableToQat); 147availableToTitle = Math.Max(leftSpace, rightSpace); 153availableToTitle = Math.Max(availableToTitle, 0); 157desiredSize.Height = Math.Max(desiredSize.Height, titleHost.DesiredSize.Height); 201endContextualTabX = Math.Max(endContextualTabX, qatDesiredWidth);
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (1)
394_textBlock1.Width = Math.Max(1.0, width / 2.0);
System.Windows.Forms (2)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
4438_labelRatio = Math.Max(Math.Min(_labelRatio, 9), 1.1);
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (1)
770int numDigits = (int)Math.Floor(Math.Log(Math.Max(-(double)Minimum, (double)Maximum), baseSize));
System.Windows.Input.Manipulations (1)
System\Windows\Input\Manipulations\ManipulationSequence.cs (1)
1339smoothingLevel = Math.Max(0, Math.Min(1, smoothingLevel));
Text.Analyzers (8)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.FieldMetricData.cs (2)
47double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 48double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.MethodMetricData.cs (2)
58double computationalComplexityVolume = Math.Max(0.0, Math.Log(computationalComplexityMetrics.Volume)); //avoid Log(0) = -Infinity 59double logEffectiveLinesOfCode = Math.Max(0.0, Math.Log(computationalComplexityMetrics.EffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (2)
175double logAvgComputationalComplexityVolume = Math.Max(0.0, Math.Log(avgComputationalComplexityVolume)); //avoid Log(0) = -Infinity 176double logAvgLinesOfCode = Math.Max(0.0, Math.Log(avgEffectiveLinesOfCode)); //avoid Log(0) = -Infinity
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\ComputationalComplexityMetrics.cs (1)
437=> Length * Math.Max(0.0, Math.Log(Vocabulary, 2));
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\MetricsHelper.cs (1)
37maintIndex = Math.Max(0.0, maintIndex);