33 references to CreateTruncating
System.Collections.Immutable (6)
System\Collections\Frozen\Integer\DenseIntegralFrozenDictionary.cs (6)
56int min = int.CreateTruncating((TKeyUnderlying)(object)e.Current.Key); 60int key = int.CreateTruncating((TKeyUnderlying)(object)e.Current.Key); 85int index = int.CreateTruncating((TKeyUnderlying)(object)entry.Key); 105optionalValues[int.CreateTruncating((TKeyUnderlying)(object)entry.Key) - min] = new(entry.Value, hasValue: true); 136int index = int.CreateTruncating((TKeyUnderlying)(object)key); 169int index = int.CreateTruncating((TKeyUnderlying)(object)key) - _minInclusive;
System.Linq (4)
System\Linq\Range.cs (1)
44private int CountForDebugger => int.CreateTruncating(_endExclusive - _start);
System\Linq\Range.SpeedOpt.cs (2)
29int count = int.CreateTruncating(end - start); 40public int Count => int.CreateTruncating(_endExclusive - _start);
System\Linq\Select.SpeedOpt.cs (1)
268private int Count => int.CreateTruncating(_end - _start);
System.Net.Http (1)
System\Net\Http\Headers\KnownHeaders.cs (1)
135static int GetLower(T value) => int.CreateTruncating(value) | 0x20;
System.Numerics.Tensors (7)
System\Numerics\Tensors\netcore\Common\TensorPrimitives.IIndexOfMinMaxOperator.cs (6)
132return int.CreateTruncating(currentIndex.ToScalar()) + IndexOfFirstMatch(nanMask); 150return int.CreateTruncating(HorizontalAggregate<TInt, MinOperator<TInt>>(aggIndex)); 363return int.CreateTruncating(currentIndex.ToScalar()) + IndexOfFirstMatch(nanMask); 381return int.CreateTruncating(HorizontalAggregate<TInt, MinOperator<TInt>>(aggIndex)); 594return int.CreateTruncating(currentIndex.ToScalar()) + IndexOfFirstMatch(nanMask); 612return int.CreateTruncating(HorizontalAggregate<TInt, MinOperator<TInt>>(aggIndex));
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertTruncating.cs (1)
109public static int Invoke(float x) => int.CreateTruncating(x);
System.Private.CoreLib (15)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Guid.cs (1)
881int c = int.CreateTruncating(guidString[i]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.DecimalIeee754.cs (9)
1563int lz = int.CreateTruncating(TValue.LeadingZeroCount(remainder)); 2810roundDigit = int.CreateTruncating(removed); 2815roundDigit = int.CreateTruncating(rd); 2840roundDigit = int.CreateTruncating(remainder / scale); 2859roundDigit = int.CreateTruncating(remainder / scale); 2881roundDigit = int.CreateTruncating(WideDivideByPow10(ref high, ref low, TValue.CreateTruncating(10))); 3019int leadDigit = int.CreateTruncating(lead); 3065return int.CreateTruncating(significand & TValue.One); 3084return int.CreateTruncating(quotient & TValue.One);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\BFloat16.cs (4)
537int scale = int.CreateTruncating(TInteger.LeadingZeroCount(abs)); 543float significand = (float)int.CreateTruncating(significandBits); 602int scale = int.CreateTruncating(TInteger.LeadingZeroCount(value)); 608float significand = (float)int.CreateTruncating(significandBits);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Random.cs (1)
305return T.CreateTruncating(Next(int.CreateTruncating(maxExclusive)));