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