13 references to Clamp
aspire (2)
Commands\DocsSearchCommand.cs (1)
67var limit = Math.Clamp(parseResult.GetValue(s_limitOption) ?? 5, 1, 10);
Mcp\Tools\SearchDocsTool.cs (1)
76topK = Math.Clamp(topKValue, 1, 10);
ILCompiler.ReadyToRun (1)
src\runtime\src\coreclr\tools\Common\CallingConvention\ArgIterator.cs (1)
932align = Math.Clamp(_argTypeHandle.GetFieldAlignment(), 8, 16);
Microsoft.Diagnostics.DataContractReader.Contracts (1)
src\runtime\src\coreclr\tools\Common\CallingConvention\ArgIterator.cs (1)
932align = Math.Clamp(_argTypeHandle.GetFieldAlignment(), 8, 16);
System.Diagnostics.TextWriterTraceListener (1)
System\Diagnostics\XmlWriterTraceListener.cs (1)
231InternalWrite(Math.Clamp((int)eventType, 0, 255));
System.Private.CoreLib (5)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
649public static int Clamp(int value, int min, int max) => Math.Clamp(value, min, max);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.DecimalIeee754.cs (1)
3760return new decimal(0, 0, 0, decoded.Signed, (byte)Math.Clamp(-decoded.UnbiasedExponent, 0, 28));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (1)
852value = new decimal(0, 0, 0, sign, (byte)Math.Clamp(-e, 0, 28));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (2)
484int rentalLength = Math.Clamp(buffer.Length, MinWriteRentedArraySize, MaxWriteRentedArraySize); 560int rentalLength = Math.Clamp(remainingOuterEncodedBytes.Length, MinWriteRentedArraySize, MaxWriteRentedArraySize);
System.Windows.Forms (2)
System\Windows\Forms\Printing\PrintPreviewControl.cs (2)
770_hScrollBar.Value = Math.Clamp(value.X, _hScrollBar.Minimum, _hScrollBar.Maximum); 771_vScrollBar.Value = Math.Clamp(value.Y, _vScrollBar.Minimum, _vScrollBar.Maximum);
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Internals\ScaleHelper.cs (1)
242textScale = Math.Clamp(textScale, MinTextScaleValue, MaxTextScaleValue);