143 references to Abs
mscorlib (5)
system\random.cs (1)
62int subtraction = (Seed == Int32.MinValue) ? Int32.MaxValue : Math.Abs(Seed);
system\runtime\remoting\soapinteroptypes.cs (4)
271CarryOver(Math.Abs(timeSpan.Days), out years, out months, out days); 280sb.Append(Math.Abs(timeSpan.Hours)); 282sb.Append(Math.Abs(timeSpan.Minutes)); 284sb.Append(Math.Abs(timeSpan.Seconds));
PresentationCore (5)
Core\CSharp\MS\Internal\AnimatedTypeHelpers.cs (3)
368return Math.Abs((Int32)to - (Int32)from); 406return Math.Abs(to - from); 411return Math.Abs(to - from);
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\SerializationHelper.cs (1)
108ull = (ulong)Math.Abs(Value);
Shared\MS\Internal\Ink\BitStream.cs (1)
288int rightShiftNextByteBy = Math.Abs((countOfBits - _cbitsInPartialByte) - Native.BitsPerByte);
PresentationFramework (28)
src\Framework\MS\Internal\Documents\DocumentGrid.cs (1)
330if (Math.Abs(pageNumber - _firstVisiblePageNumber) > 1)
src\Framework\MS\Internal\Documents\DocumentPageTextView.cs (2)
657while (Math.Abs(pagesMoved) < Math.Abs(count))
src\Framework\MS\Internal\Documents\MultiPageTextView.cs (8)
767Invariant.Assert(Math.Abs(request.NewCount) >= Math.Abs(linesMoved)); 839Invariant.Assert(Math.Abs(request.NewCount) >= Math.Abs(pagesMoved)); 987Invariant.Assert(Math.Abs(pagesMoved) <= Math.Abs(count)); 1200int closestDistance = Math.Abs(count); 1225int distance = Math.Abs(currentPageNumber - pageNumber);
src\Framework\MS\Internal\PtsHost\TableParaClient.cs (6)
701int du = Math.Min(Math.Abs(rect.u - u), Math.Abs(rect.u + rect.du - u)); 702int dv = Math.Min(Math.Abs(rect.v - v), Math.Abs(rect.v + rect.dv - v)); 1075int iDistance = Math.Abs((cpc.Rect.u + cpc.Rect.du / 2) - suggestedU); 1157int iDistance = Math.Abs((cpc.Rect.u + cpc.Rect.du / 2) - suggestedU);
src\Framework\System\Windows\Application.cs (1)
2703if (Math.Abs(diff) == 1)
src\Framework\System\Windows\Controls\DataGrid.cs (4)
5078int newRowCount = Math.Abs(endIndex - startIndex) + 1; 5079int newColumnCount = Math.Abs(endColumnIndex - startColumnIndex) + 1; 5098int previousRowCount = Math.Abs(currentCellIndex - startIndex) + 1; 5100int previousColumnCount = Math.Abs(currentCellColumnIndex - startColumnIndex) + 1;
src\Framework\System\Windows\Controls\ScrollViewer.cs (1)
1899if (Math.Abs(Environment.TickCount - _panningInfo.InertiaBoundaryBeginTimestamp) < PanningInfo.InertiaBoundryMinimumTicks)
src\Framework\System\Windows\Controls\TextRangeAdaptor.cs (1)
1004int absCount = (count == int.MinValue) ? int.MaxValue : Math.Abs(count);
src\Framework\System\Windows\Documents\DocumentSequenceTextPointer.cs (1)
1056distance = Math.Abs(distance);
src\Framework\System\Windows\Documents\FlowPosition.cs (1)
322distance = Math.Abs(distance);
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (1)
1431int cCols = Math.Abs(columnCount);
src\Framework\System\Windows\SystemFonts.cs (1)
1008return (double)(Math.Abs(height) * 96 / dpi);
System (1)
net\System\Net\mail\SmtpDateTime.cs (1)
443uint minutes = (uint)Math.Abs(span.Minutes);
System.Activities.Presentation (2)
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorRouter.cs (2)
1475if (Math.Sign(newDistance) == Math.Sign(originalDistance) && Math.Abs(newDistance) < Math.Abs(originalDistance))
System.Data (4)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorRouter.cs (2)
1475if (Math.Sign(newDistance) == Math.Sign(originalDistance) && Math.Abs(newDistance) < Math.Abs(originalDistance))
fx\src\data\System\Data\SQLTypes\SQLDecimal.cs (2)
3075int lAdjust = Math.Abs(lPosition - (int)n.m_bScale); // Precision adjustment 3110lAdjust = Math.Abs(lPosition - n.m_bScale);
System.Data.Entity (1)
System\Data\Mapping\Update\Internal\RelationshipConstraintValidator.cs (1)
219int absoluteCount = Math.Abs(addedCount - deletedCount);
System.Drawing (6)
commonui\System\Drawing\Icon.cs (6)
714int bestDelta = Math.Abs(bestWidth - width) + Math.Abs(bestHeight - height); 715int thisDelta = Math.Abs(EntryTemp.bWidth - width) + Math.Abs(EntryTemp.bHeight - height); 916UnsafeNativeMethods.CopyMemory(new HandleRef(this, destPtr), new HandleRef(this, srcPtr), Math.Abs(targetData.Stride)); 926for (int j = 3; j < Math.Abs(bmpData.Stride); j += 4) { // stride here is fine since we know we're doing this on the whole image
System.Runtime.Serialization (4)
System\Runtime\Serialization\Json\JsonWriterDelegator.cs (2)
246int hours = Math.Abs(ts.Hours); 248int minutes = Math.Abs(ts.Minutes);
System\Xml\XmlConverter.cs (2)
1110offset += ToCharsD2(Math.Abs(ts.Hours), chars, offset); 1112offset += ToCharsD2(Math.Abs(ts.Minutes), chars, offset);
System.ServiceModel.Web (2)
System\ServiceModel\Dispatcher\HelpExampleGenerator.cs (2)
524int hours = Math.Abs(ts.Hours); 526int minutes = Math.Abs(ts.Minutes);
System.Web (4)
UI\WebControls\SiteMapDataSource.cs (1)
229Provider.HintNeighborhoodNodes(node, Math.Abs(startingNodeOffset), 0);
UI\WebParts\WebPartManager.cs (2)
1927int guidHash = Math.Abs(Guid.NewGuid().GetHashCode()); 1940int guidHash = Math.Abs(Guid.NewGuid().GetHashCode());
Util\ReadWriteSpinLock.cs (1)
261double randomBackoffFactor = s_backOffFactors[Math.Abs(threadId) % BACK_OFF_FACTORS_LENGTH];
System.Web.DataVisualization (10)
Common\ChartTypes\LineChart.cs (1)
1580 if(Math.Abs(secondPoint.index - firstPoint.index) != 1)
Common\ChartTypes\PieChart.cs (1)
5146 if( Math.Abs( numEmptyUp - numEmptyDown ) < 2 )
Common\General\ChartGraphics.cs (4)
2019offsetX = (float)Math.Sin((Math.Abs(angle)) / 180F * Math.PI) * labelRect.Height / 2F; 2073float sizeChange = truncateRect.Width / (float)Math.Cos(Math.Abs(angle) / 180F * Math.PI); 2076sizeChange -= labelRect.Height * (float)Math.Tan(Math.Abs(angle) / 180F * Math.PI); 2084sizeChange -= labelRect.Height * (float)Math.Tan(Math.Abs(angle) / 180F * Math.PI);
Common\General\LegendColumns.cs (4)
1500 cellSize.Width = (int)(Math.Abs(this.SeriesSymbolSize.Width) * singleWCharacterSize.Width / 100f); 1501 cellSize.Height = (int)(Math.Abs(this.SeriesSymbolSize.Height) * singleWCharacterSize.Height / 100f); 1518 cellSize.Width = (int)(Math.Abs(this.ImageSize.Width) * singleWCharacterSize.Width / 100f); 1519 cellSize.Height = (int)(Math.Abs(this.ImageSize.Height) * singleWCharacterSize.Height / 100f);
System.Web.Mobile (3)
UI\MobileControls\Adapters\HtmlCalendarAdapter.cs (3)
129int deltaR = System.Math.Abs(backColor.R - 0xC0); 130int deltaG = System.Math.Abs(backColor.G - 0xC0); 131int deltaB = System.Math.Abs(backColor.B - 0xC0);
System.Windows.Forms (36)
winforms\Managed\System\WinForms\DataGridViewMethods.cs (15)
5842if (Math.Abs(dgvcme.X - this.lastMouseClickInfo.x) <= hotDoubleClickZone.Width / 2 && 5843Math.Abs(dgvcme.Y - this.lastMouseClickInfo.y) <= hotDoubleClickZone.Height / 2) 9795int absXOffset = Math.Abs(xOffset), normOffset = xOffset / absXOffset; 9810hti = HitTest(ptMouse.X+(this.RightToLeftInternal?1:-1)*(xOffset+normOffset), ptMouse.Y-yOffset-(yOffset/Math.Abs(yOffset))); 13041if (Math.Abs(this.ptMouseDownGridCoord.X - ptGridCoord.X) >= DataGridView.DragSize.Width || 13042Math.Abs(this.ptMouseDownGridCoord.Y - ptGridCoord.Y) >= DataGridView.DragSize.Height) 16724this.HorizScrollTimer.Interval = GetColumnScrollRate(Math.Abs(xOffset)); 16739this.VertScrollTimer.Interval = GetRowScrollRate(Math.Abs(yOffset)); 16960if (Math.Abs(this.VerticalOffset - originalVerticalOffset) >= Math.Abs(fullNotches * this.vertScrollBar.LargeChange)) 16973if (Math.Abs(this.HorizontalOffset - originalHorizontalOffset) >= Math.Abs(fullNotches * this.horizScrollBar.LargeChange)) 17056absScrollBands = Math.Abs(scrollBands); 29763int absYOffset = Math.Abs(yOffset), normOffset = yOffset / absYOffset; 29778hti = HitTest(ptMouse.X - xOffset - (xOffset / Math.Abs(xOffset)), ptMouse.Y - yOffset - normOffset);
winforms\Managed\System\WinForms\ImageList.cs (1)
654UnsafeNativeMethods.CopyMemory(new HandleRef(this, destPtr), new HandleRef(this, srcPtr), Math.Abs(targetData.Stride));
winforms\Managed\System\WinForms\Layout\DockAndAnchorLayout.cs (8)
195left = Math.Max(Math.Abs(left), Math.Abs(cachedBounds.Left)); 197right = left + Math.Max(element.Bounds.Width, cachedBounds.Width) + Math.Abs(right); 201right = right > 0 ? right : element.Bounds.Right + Math.Abs(right); 209top = Math.Max(Math.Abs(top), Math.Abs(cachedBounds.Top)); 211bottom = top + Math.Max(element.Bounds.Height, cachedBounds.Height) + Math.Abs(bottom); 215bottom = bottom > 0 ? bottom : element.Bounds.Bottom + Math.Abs(bottom);
winforms\Managed\System\WinForms\PropertyGrid.cs (1)
2309if (Math.Abs(gridBottom - y) <= 1 && y > gridTop) {
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (7)
2813if (Math.Abs(screenPoint.X - rowSelectPos.X) < SystemInformation.DoubleClickSize.Width && 2814Math.Abs(screenPoint.Y - rowSelectPos.Y) < SystemInformation.DoubleClickSize.Height) { 3374if (Math.Abs(initialOffset - originalOffset) >= Math.Abs(fullNotches * this.scrollBar.LargeChange)) { 5113return(Math.Abs(x - InternalLabelWidth) < 4); 5772else if (!resizeUp && Math.Abs(Height - y) < ResizeBorderSize) 5776else if (resizeUp && Math.Abs(y) < ResizeBorderSize)
winforms\Managed\System\WinForms\ScrollBar.cs (1)
730while (Math.Abs(wheelDelta) >= NativeMethods.WHEEL_DELTA) {
winforms\Managed\System\WinForms\StatusStrip.cs (2)
583int deltaBottomEdge = Math.Abs(rootHwndClientArea.bottom - gripLocation.y); 584int deltaRightEdge = Math.Abs(rootHwndClientArea.right - gripLocation.x);
winforms\Managed\System\WinForms\ToolStripManager.cs (1)
407&& Math.Abs(nextControl.TabIndex - startTabIndex) <= 1) {
System.Windows.Forms.DataVisualization (10)
Common\ChartTypes\LineChart.cs (1)
1580 if(Math.Abs(secondPoint.index - firstPoint.index) != 1)
Common\ChartTypes\PieChart.cs (1)
5146 if( Math.Abs( numEmptyUp - numEmptyDown ) < 2 )
Common\General\ChartGraphics.cs (4)
2019offsetX = (float)Math.Sin((Math.Abs(angle)) / 180F * Math.PI) * labelRect.Height / 2F; 2073float sizeChange = truncateRect.Width / (float)Math.Cos(Math.Abs(angle) / 180F * Math.PI); 2076sizeChange -= labelRect.Height * (float)Math.Tan(Math.Abs(angle) / 180F * Math.PI); 2084sizeChange -= labelRect.Height * (float)Math.Tan(Math.Abs(angle) / 180F * Math.PI);
Common\General\LegendColumns.cs (4)
1500 cellSize.Width = (int)(Math.Abs(this.SeriesSymbolSize.Width) * singleWCharacterSize.Width / 100f); 1501 cellSize.Height = (int)(Math.Abs(this.SeriesSymbolSize.Height) * singleWCharacterSize.Height / 100f); 1518 cellSize.Width = (int)(Math.Abs(this.ImageSize.Width) * singleWCharacterSize.Width / 100f); 1519 cellSize.Height = (int)(Math.Abs(this.ImageSize.Height) * singleWCharacterSize.Height / 100f);
System.Workflow.Activities (2)
Designers\StateMachineDesignerPaint.cs (2)
270return Math.Abs(p1.Y - p2.Y); 272return Math.Abs(p1.X - p2.X);
System.Workflow.ComponentModel (17)
AuthoringOM\Design\Connector.cs (6)
2474int steps = Math.Max(Math.Abs(direction.X / margin.Width), Math.Abs(direction.Y / margin.Height)); //one of the values will be null 2983newDistance = Math.Abs(newCover.A.X - escape.X); 2985newDistance = Math.Abs(newCover.A.Y - escape.Y); 2987if (Math.Sign(newDistance) == Math.Sign(originalDistance) && Math.Abs(newDistance) < Math.Abs(originalDistance))
AuthoringOM\Design\DesignerHelpers.cs (1)
1938int area = Math.Abs((((point.Y - line[0].Y) * (line[1].X - line[0].X)) - ((point.X - line[0].X) * (line[1].Y - line[0].Y))));
AuthoringOM\Design\MessageFilters\ConnectionManager.cs (2)
125(Math.Abs(this.initialDragPoint.Value.X - logicalPoint.X) > SystemInformation.DragSize.Width || 126Math.Abs(this.initialDragPoint.Value.Y - logicalPoint.Y) > SystemInformation.DragSize.Height))
AuthoringOM\Design\MessageFilters\DragDropManager.cs (2)
117else if (parentView.RootDesigner != null && this.dragStarted && (eventArgs.Button & MouseButtons.Left) > 0 && (Math.Abs(this.dragInitiationPoint.X - logicalPoint.X) > SystemInformation.DragSize.Width || Math.Abs(this.dragInitiationPoint.Y - logicalPoint.Y) > SystemInformation.DragSize.Height))
AuthoringOM\Design\MessageFilters\DragSelectionMessageFilter.cs (4)
66(Math.Abs(this.startDrag.X - logicalPoint.X) > (int)(dragMultiply * (float)SystemInformation.DragSize.Width) || Math.Abs(this.startDrag.Y - logicalPoint.Y) > (int)(dragMultiply * (float)SystemInformation.DragSize.Height))) 134return new Rectangle(Math.Min(this.startDrag.X, this.endDrag.X), Math.Min(this.startDrag.Y, this.endDrag.Y), Math.Abs(this.endDrag.X - this.startDrag.X), Math.Abs(this.endDrag.Y - this.startDrag.Y));
AuthoringOM\Design\WorkflowLayouts.cs (2)
662bitmapDrawingPoint.X = pageLayoutData.ViewablePageBounds.X + Math.Abs(pageLayoutData.LogicalPageBounds.X - intersectedViewPort.X); 663bitmapDrawingPoint.Y = pageLayoutData.ViewablePageBounds.Y + Math.Abs(pageLayoutData.LogicalPageBounds.Y - intersectedViewPort.Y);
System.Workflow.Runtime (1)
WorkflowRuntime.cs (1)
64return dictionaryDictionary[Math.Abs(key.GetHashCode() % dictionaryDictionary.Count)];
UIAutomationClientsideProviders (2)
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (1)
680int height = Math.Abs(_provider.GetLogfont().lfHeight);;
MS\Internal\AutomationProxies\WindowsMenu.cs (1)
2336cMoves = Math.Abs (cMoves);