248 references to Abs
Microsoft.Build (2)
Evaluation\Expander.cs (2)
4643if (Math.Abs(arg - d) == 0) 4680if (Math.Abs(arg - d) == 0)
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\Financial.vb (1)
731If Abs(dY0) < cnL_IT_EPSILON Then
PresentationCore (82)
MS\Internal\AnimatedTypeHelpers.cs (6)
404return Math.Abs(to - from); 441return Math.Abs((to - from).Length); 446return Math.Abs((to - from).Length); 481return Math.Abs(((System.Windows.Vector)to - (System.Windows.Vector)from).Length); 498return Math.Abs((to - from).Length); 503return Math.Abs((to - from).Length);
MS\Internal\Ink\Bezier.cs (4)
389bool accept = (Math.Abs(det) > Math.Abs(s) * DoubleUtil.DBL_EPSILON && 390Math.Abs(det) > Math.Abs(u) * DoubleUtil.DBL_EPSILON);
MS\Internal\Ink\CuspData.cs (2)
502_dist = Math.Abs(rR) + Math.Abs(rB);
MS\Internal\Ink\EllipticalNodeOperations.cs (4)
622radius = Math.Abs(nearest.Y); 626radius = Math.Abs(nearest.X); 759findex = Math.Abs(Math.Min(s1, s2) - 0d) < Math.Abs(Math.Max(s1, s2) - 1d) ? 0d : 1d;
MS\Internal\Ink\Lasso.cs (2)
521return (Math.Abs(vector.X) < MinDistance && Math.Abs(vector.Y) < MinDistance);
MS\Internal\Ink\StrokeNodeOperations.cs (2)
738double r = (Math.Abs(nextNode.X) < Math.Abs(nextNode.Y)) //DoubleUtil.IsZero(nextNode.X)
MS\Internal\Ink\StrokeRenderer.cs (5)
93double delta = Math.Abs(GetAngleDeltaFromLast(strokeNode.PreviousPosition, strokeNode.Position, ref lastAngle)); 523bool directionChangedOverAbsoluteThreshold = Math.Abs(delta) > 90d && Math.Abs(delta) < (360d - 90d); 524bool directionChangedOverOverlapThreshold = overlap && !(ignorePressure || strokeNode.PressureFactor == 1f) && Math.Abs(delta) > 30d && Math.Abs(delta) < (360d - 30d);
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (2)
621if (Math.Abs(visUV1.X - visUV2.X) > Math.Abs(visUV1.Y - visUV2.Y))
MS\Internal\TextFormatting\LineServicesCallbacks.cs (2)
1271penThickness = Math.Abs(penThickness); 1347drawingPenThickness = drawingPenThickness / Math.Abs(unitValue);
System\Windows\Input\MouseDevice.cs (2)
2171return (Math.Abs(newPosition.X - _lastClick.X) < doubleClickDeltaX) && 2172(Math.Abs(newPosition.Y - _lastClick.Y) < doubleClickDeltaY);
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (2)
1298bool isSameSpot = (Math.Abs(ptPixels.X - _lastTapPoint.X) < doubleTapSize.Width) && 1299(Math.Abs(ptPixels.Y - _lastTapPoint.Y) < doubleTapSize.Height);
System\Windows\Input\Stylus\Wisp\WispLogic.cs (2)
1094bool isSameSpot = (Math.Abs(pPixelPoint.X - pLastPixelPoint.X) < doubleTapSize.Width) && 1095(Math.Abs(pPixelPoint.Y - pLastPixelPoint.Y) < doubleTapSize.Height);
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (2)
1504if ((Math.Abs(_lastMouseScreenLocation.X - dragPosition.X) > delta.Width) || 1505(Math.Abs(_lastMouseScreenLocation.Y - dragPosition.Y) > delta.Height))
System\Windows\Media\Animation\Clock.cs (1)
2160timeUntilNextBoundary = DivideTimeSpan(_currentDuration.TimeSpan, Math.Abs(parentSpeed));
System\Windows\Media\Animation\KeySpline.cs (2)
362absdx = Math.Abs(dx); 377if (Math.Abs(x - time) < accuracy * absdx)
System\Windows\Media\EllipseGeometry.cs (13)
103currentCenter.X - Math.Abs(currentRadiusX), 104currentCenter.Y - Math.Abs(currentRadiusY), 1052.0 * Math.Abs(currentRadiusX), 1062.0 * Math.Abs(currentRadiusY)); 169strokeThickness = Math.Abs(pen.Thickness); 173center.X - Math.Abs(radiusX)-0.5*strokeThickness, 174center.Y - Math.Abs(radiusY)-0.5*strokeThickness, 1752.0 * Math.Abs(radiusX)+strokeThickness, 1762.0 * Math.Abs(radiusY)+strokeThickness); 254double area = Math.Abs(RadiusX * RadiusY) * Math.PI; 260area *= Math.Abs(transform.Value.Determinant); 364radiusX = Math.Abs(radiusX); 365radiusY = Math.Abs(radiusY);
System\Windows\Media\GlyphRun.cs (1)
1773_baseVectorY = _baseVectorX == 0 ? 0 : Math.Abs(m11 * m22 - m12 * m21) / _baseVectorX;
System\Windows\Media\Imaging\TransformedBitmap.cs (4)
136scaleX = Math.Abs(m.M11); 137scaleY = Math.Abs(m.M22); 155scaleX = Math.Abs(m.M12); 156scaleY = Math.Abs(m.M21);
System\Windows\Media\RectangleGeometry.cs (6)
205strokeThickness = Math.Abs(pen.Thickness); 299double area = Math.Abs(rect.Width * rect.Height); 302area -= Math.Abs(radiusX * radiusY) * (4.0 - Math.PI); 308area *= Math.Abs(transform.Value.Determinant); 478radiusX = Math.Min(rect.Width * (1.0 / 2.0), Math.Abs(radiusX)); 479radiusY = Math.Min(rect.Height * (1.0 / 2.0), Math.Abs(radiusY));
System\Windows\Media3D\OrthographicCamera.cs (1)
230return x + 0.1*Math.Abs(x) + 1.0;
System\Windows\Media3D\Quaternion.cs (11)
170double maxcoeff = Math.Max(Math.Abs(_x),Math.Max(Math.Abs(_y),Math.Abs(_z))); 260double rmax = 1.0/Max(Math.Abs(_x), 261Math.Abs(_y), 262Math.Abs(_z), 263Math.Abs(_w)); 445double max = Math.Max(Math.Max(Math.Abs(_x),Math.Abs(_y)), 446Math.Max(Math.Abs(_z),Math.Abs(_w)));
System\Windows\Media3D\Vector3D.cs (6)
90double m = Math.Abs(_x); 91double absy = Math.Abs(_y); 92double absz = Math.Abs(_z); 468return new Size3D(Math.Abs(vector._x), Math.Abs(vector._y), Math.Abs(vector._z));
PresentationFramework (85)
MS\Internal\AnimatedTypeHelpers.cs (1)
84return Math.Abs(to - from);
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (4)
1057if (DoubleUtil.GreaterThan(Math.Abs(offsetX), Math.Abs(_offsetX))) 1069if (DoubleUtil.GreaterThan(Math.Abs(offsetY), Math.Abs(_offsetY)))
MS\Internal\Documents\DocumentGrid.cs (1)
2258double aspectDiff = Math.Abs(layoutAspect - viewportAspect);
MS\Internal\Documents\FlowDocumentView.cs (2)
134if (Math.Abs(_scrollData.ExtentWidth - _scrollData.ViewportWidth) < 1) 138if (Math.Abs(_scrollData.ExtentHeight - _scrollData.ViewportHeight) < 1)
MS\Internal\Documents\MultiPageTextView.cs (4)
1100horz = Math.Min(Math.Abs(point.X - textViewBounds.Left), Math.Abs(point.X - textViewBounds.Right)); 1108vert = Math.Min(Math.Abs(point.Y - textViewBounds.Top), Math.Abs(point.Y - textViewBounds.Bottom));
MS\Internal\Documents\TextDocumentView.cs (2)
2107double distance = Math.Abs(point.X - midPoint.X) + Math.Abs(point.Y - midPoint.Y);
System\Windows\Controls\DataGrid.cs (2)
6587distance = Math.Abs(pt.Y - cellBounds.Top); 6595distance = Math.Abs(pt.X - cellBounds.Left);
System\Windows\Controls\DataGridColumnCollection.cs (1)
1344TakeAwayWidthFromColumns(null, Math.Abs(availableSpaceChange), false, newTotalAvailableSpace);
System\Windows\Controls\Grid.cs (2)
3226return (Math.Abs(d) < c_epsilon); 3237return (Math.Abs(d1 - d2) < c_epsilon);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
1247return (DoubleUtil.GreaterThan(Math.Abs(currentPos.X - originalPos.X), c_thresholdX));
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (1)
649return DoubleUtil.GreaterThan(Math.Abs(currentPos.X - originalPos.X), SystemParameters.MinimumHorizontalDragDistance);
System\Windows\Controls\Primitives\Popup.cs (11)
2109if (Math.Abs(score - childArea) < Tolerance) 2135if (Math.Abs(intersection.Width - childBounds.Width) > Tolerance || 2136Math.Abs(intersection.Height - childBounds.Height) > Tolerance) 2150if (!IsTransparent || double.IsNaN(horizontalAxis.Y) || Math.Abs(horizontalAxis.Y) < Tolerance) 2162else if (IsTransparent && Math.Abs(horizontalAxis.X) < Tolerance) 2185if (!IsTransparent || double.IsNaN(verticalAxis.X) || Math.Abs(verticalAxis.X) < Tolerance) 2196else if (IsTransparent && Math.Abs(verticalAxis.Y) < Tolerance) 2251if (!IsTransparent || double.IsNaN(verticalAxis.X) || Math.Abs(verticalAxis.X) < Tolerance) 2255else if (IsTransparent && Math.Abs(verticalAxis.Y) < Tolerance) 2273if (!IsTransparent || double.IsNaN(horizontalAxis.X) || Math.Abs(horizontalAxis.Y) < Tolerance) 2277else if (IsTransparent && Math.Abs(horizontalAxis.X) < Tolerance)
System\Windows\Controls\Primitives\PopupRoot.cs (2)
227restrictWidth = Math.Abs(restrictedSize.Width - desiredSize.Width) > Popup.Tolerance; 228restrictHeight = Math.Abs(restrictedSize.Height - desiredSize.Height) > Popup.Tolerance;
System\Windows\Controls\Primitives\ScrollBar.cs (2)
349perpendicularDragDelta = Math.Abs(verticalDragDelta); 353perpendicularDragDelta = Math.Abs(horizontalDragDelta);
System\Windows\Controls\Primitives\TickBar.cs (4)
535Point pt2 = new Point(startPoint.X + tickLen2, y0 + Math.Abs(tickLen2) * progression); 548pt2 = new Point(startPoint.X + tickLen2, y0 - Math.Abs(tickLen2) * progression); 640Point pt2 = new Point(x0 + Math.Abs(tickLen2) * progression, startPoint.Y + tickLen2); 653pt2 = new Point(x0 - Math.Abs(tickLen2) * progression, startPoint.Y + tickLen2);
System\Windows\Controls\ScrollViewer.cs (10)
1757DoubleUtil.LessThan(Math.Abs(unusedX), PanningInfo.PreFeedbackTranslationX)) 1765DoubleUtil.LessThan(Math.Abs(unusedY), PanningInfo.PreFeedbackTranslationY)) 1858return (DoubleUtil.GreaterThanOrClose(Math.Abs(_panningInfo.UnusedTranslation.X), PanningInfo.MaxInertiaBoundaryTranslation) || 1859DoubleUtil.GreaterThanOrClose(Math.Abs(_panningInfo.UnusedTranslation.Y), PanningInfo.MaxInertiaBoundaryTranslation)); 1878bool validX = (DoubleUtil.GreaterThan(Math.Abs(translation.X), PanningInfo.PrePanTranslation)); 1879bool validY = (DoubleUtil.GreaterThan(Math.Abs(translation.Y), PanningInfo.PrePanTranslation)); 1889bool biggerX = (DoubleUtil.GreaterThanOrClose(Math.Abs(translation.X), Math.Abs(translation.Y))); 1902bool biggerY = (DoubleUtil.GreaterThanOrClose(Math.Abs(translation.Y), Math.Abs(translation.X)));
System\Windows\Controls\VirtualizingStackPanel.cs (10)
516double delta = Math.Abs(scrollX - oldViewportOffset.X); 644double delta = Math.Abs(scrollY - oldViewportOffset.Y); 4767pixelSizeBeforeViewport = Math.Max(pixelSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X)); 4771logicalSizeBeforeViewport = Math.Max(logicalSizeBeforeViewport, Math.Abs(_viewport.X - _extendedViewport.X)); 4883pixelSizeBeforeViewport = Math.Max(pixelSizeBeforeViewport, Math.Abs(_viewport.Y - _extendedViewport.Y)); 4887logicalSizeBeforeViewport = Math.Max(logicalSizeBeforeViewport, Math.Abs(_viewport.Y - _extendedViewport.Y)); 6552double eps = (Math.Abs(value1) + Math.Abs(value2)) * Tolerance; 11881else if (DoubleUtil.GreaterThan(Math.Abs(newOffset - oldOffset), _viewport.Width)) 11897else if (DoubleUtil.GreaterThan(Math.Abs(newOffset - oldOffset), _viewport.Height))
System\windows\Documents\CaretElement.cs (2)
410deltaToScroll = Math.Abs(targetPoint.Y); 427deltaToScroll = Math.Abs(targetPoint.X);
System\Windows\Documents\FixedSOMPageConstructor.cs (5)
558if (Math.Abs(textRunRect.Left - fixedBlockRect.Left) <= textRun.DefaultCharWidth || 559Math.Abs(textRunRect.Right - fixedBlockRect.Right) <= textRun.DefaultCharWidth) 1031if (Math.Abs(t.BoundingRect.Left - row.BoundingRect.Left) < fudge && 1032Math.Abs(t.BoundingRect.Right - row.BoundingRect.Right) < fudge && 1033Math.Abs(t.BoundingRect.Bottom - row.BoundingRect.Top) < fudge)
System\Windows\Documents\FixedSOMSemanticBox.cs (1)
218double overlap = Math.Abs(thisRectRefX - otherRectRefX);
System\Windows\Documents\FixedTextBuilder.cs (1)
881double xDistance = Math.Abs(currentPt.X - prevPt.X);
System\windows\Documents\TextSelection.cs (2)
2251caretRectangle.Y += caretRectangle.Height - Math.Abs(bottom.Y - top.Y); 2252caretRectangle.Height = Math.Abs(bottom.Y - top.Y);
System\Windows\FrameworkElement.cs (12)
4174Double yCoverD = (yConstrInfinite ? Double.PositiveInfinity : Math.Abs(yConstr/d)); 4175Double xCoverA = (xConstrInfinite ? Double.PositiveInfinity : Math.Abs(xConstr/a)); 4195h = Math.Min(0.5*Math.Abs(xConstr/c), yCoverD); 4206w = Math.Min( 0.5*Math.Abs(yConstr/b), xCoverA); 4214Double yCoverB = Math.Abs(yConstr/b); 4215Double xCoverC = Math.Abs(xConstr/c); 4235h = Math.Min(0.5*Math.Abs(yConstr/d), xCoverC); 4246w = Math.Min( 0.5*Math.Abs(xConstr/a), yCoverB); 4252Double xCoverA = Math.Abs(xConstr / a); // w-intercept of x-constraint line. 4253Double xCoverC = Math.Abs(xConstr / c); // h-intercept of x-constraint line. 4255Double yCoverB = Math.Abs(yConstr / b); // w-intercept of y-constraint line. 4256Double yCoverD = Math.Abs(yConstr / d); // h-intercept of y-constraint line.
System\Windows\Shapes\Shape.cs (2)
470return Math.Abs(StrokeThickness); 486thickness = Math.Abs(strokeThickness);
PresentationFramework.AeroLite (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (1)
161if (!isIndeterminate && remainder > 0.0 && Math.Abs(width - trackWidth) < 1.0e-5)
PresentationFramework.Classic (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (1)
161if (!isIndeterminate && remainder > 0.0 && Math.Abs(width - trackWidth) < 1.0e-5)
PresentationFramework.Luna (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (1)
161if (!isIndeterminate && remainder > 0.0 && Math.Abs(width - trackWidth) < 1.0e-5)
PresentationFramework.Royale (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\ProgressBarBrushConverter.cs (1)
161if (!isIndeterminate && remainder > 0.0 && Math.Abs(width - trackWidth) < 1.0e-5)
ReachFramework (19)
AlphaFlattener\BrushProxy.cs (11)
516rb.RadiusX = Math.Abs(rb.RadiusX * bounds.Width); 517rb.RadiusY = Math.Abs(rb.RadiusY * bounds.Height); 2287double height = Math.Abs(start.Y - end.Y) * multiplier; 2296double width = Math.Abs(start.X - end.X) * multiplier; 2577if (Utility.AreClose(new Vector(Math.Abs(rbA.RadiusX), Math.Abs(rbA.RadiusY)) * rbA.Transform.Value, 2578new Vector(Math.Abs(rbB.RadiusX), Math.Abs(rbB.RadiusY)) * rbB.Transform.Value)) 3951if (Math.Abs(di) < Double.Epsilon) 4190_rx = Math.Abs(b.RadiusX); 4191_ry = Math.Abs(b.RadiusY);
AlphaFlattener\Utility.cs (4)
115return Math.Abs(value - 1.0) < Epsilon; 124return Math.Abs(value) < Epsilon; 197x = Math.Abs(x); 198y = Math.Abs(y);
Serialization\VisualSerializer.cs (4)
757WriteAttr("RadiusX", Math.Abs(rb.RadiusX * bounds.Width)); 758WriteAttr("RadiusY", Math.Abs(rb.RadiusY * bounds.Height)); 924WriteAttr("StrokeThickness", Math.Abs(pen.Thickness)); 956dashes.Add(Math.Abs(d));
System.Data.Common (1)
System\Data\Filter\FunctionNode.cs (1)
327return (Math.Abs((double)argumentValues[0]));
System.Private.CoreLib (18)
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
889if (Math.Abs(value) > maxUnitCount)
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1065public static double Abs(double value) => Math.Abs(value);
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendricalCalculationsHelper.cs (1)
247return Math.CopySign(Math.Min(Math.Abs(equation), TwelveHours), equation);
src\libraries\System.Private.CoreLib\src\System\Math.cs (13)
814double alternativeResult = (regularMod - (Abs(y) * Sign(x))); 816if (Abs(alternativeResult) == Abs(regularMod)) 821if (Abs(roundedResult) > Abs(divisionResult)) 831if (Abs(alternativeResult) < Abs(regularMod)) 1027double ax = Abs(x); 1028double ay = Abs(y); 1177double ax = Abs(x); 1178double ay = Abs(y); 1268if (Abs(a) >= IntegerBoundary) 1344if (Abs(value) < doubleRoundLimit)
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Scalar.cs (1)
145return (T)(object)Math.Abs((double)(object)value);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.HillClimbing.cs (1)
301move = Math.Pow(Math.Abs(move), _gainExponent) * (move >= 0.0 ? 1 : -1) * gain;
System.Runtime.Numerics (13)
System\Numerics\Complex.cs (13)
228if (Math.Abs(d) < Math.Abs(c)) 277if (Math.Abs(d) < Math.Abs(c)) 300a = Math.Abs(a); 301b = Math.Abs(b); 440Asin_Internal(Math.Abs(value.Real), Math.Abs(value.Imaginary), out b, out bPrime, out v); 476Asin_Internal(Math.Abs(value.Real), Math.Abs(value.Imaginary), out b, out bPrime, out v); 510if (Math.Abs(value.m_imaginary) <= 4.0) 727if ((Math.Abs(realCopy) >= s_sqrtRescaleThreshold) || (Math.Abs(imaginaryCopy) >= s_sqrtRescaleThreshold))
System.Windows.Controls.Ribbon (12)
Microsoft\Windows\Controls\KeyTipAdorner.cs (2)
316if (DoubleUtil.LessThan(Math.Abs(keyTipTopY), RibbonGroupKeyTipAxisNudgeSpace)) 321else if (DoubleUtil.LessThan(Math.Abs(itemsPresenter.ActualHeight - keyTipBottomY), RibbonGroupKeyTipAxisNudgeSpace))
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonContextualTabGroupsPanel.cs (1)
77if (Math.Abs(tabGroupHeader.TabsDesiredWidth - remainingSpace) > _desiredWidthEpsilon)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonTabHeadersPanel.cs (1)
146if (Math.Abs(desiredSize.Width - availableSize.Width) < _desiredWidthEpsilon)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (2)
979if (DoubleUtil.GreaterThan(Math.Abs(_mouseWheelCumulativeDelta), MouseWheelSelectionChangeThreshold)) 1622double screenWidth = Math.Abs(popupPlacementTarget.PointFromScreen(screenRect.BottomRight).X -
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (2)
415extraLength += Math.Abs(lastCharacter.X - firstCharacter.X); 423extraLength += Math.Abs(lastCharacter.X - firstCharacter.X);
MS\Internal\Generated\DoubleUtil.cs (4)
42double eps = (Math.Abs(value1) + Math.Abs(value2) + 10.0) * DBL_EPSILON; 141return Math.Abs(value - 1.0) < 10.0 * DBL_EPSILON; 154return Math.Abs(value) < 10.0 * DBL_EPSILON;
System.Windows.Input.Manipulations (10)
System\Windows\Input\Manipulations\DoubleUtil.cs (1)
158return Math.Abs(d) <= DBL_EPSILON;
System\Windows\Input\Manipulations\InertiaProcessor2D.cs (9)
618initialTranslationX.AbsoluteOffset = Math.Abs(desiredTranslationXY.X); 619initialTranslationY.AbsoluteOffset = Math.Abs(desiredTranslationXY.Y); 629initialTranslationX.AbsoluteDeceleration = Math.Abs(desiredDecelerationXY.X); 630initialTranslationY.AbsoluteDeceleration = Math.Abs(desiredDecelerationXY.Y); 697state.Duration = 2 * Math.Abs(state.Offset / state.InitialVelocity); 706state.AbsoluteDeceleration = Math.Abs(state.InitialVelocity) / state.Duration; 723state.Duration = Math.Abs(state.InitialVelocity) / state.AbsoluteDeceleration; 1081result = new VectorD(Math.Abs(baseVector.X * scale), 1082Math.Abs(baseVector.Y * scale));
WindowsFormsIntegration (1)
System\Windows\Integration\HostUtils.cs (1)
397return Math.Abs(value) < 10d * DBL_EPSILON;