124 references to CreateTruncating
System.Formats.Tar (2)
System\Formats\Tar\TarHelpers.cs (2)
251T octalFactor = T.CreateTruncating(8u); 261value = checked((value * octalFactor) + T.CreateTruncating(digit));
System.Linq (14)
System\Linq\Range.cs (1)
91Vector<T> increment = new Vector<T>(T.CreateTruncating(Vector<T>.Count));
System\Linq\Range.SpeedOpt.cs (4)
44new RangeIterator<T>(_start + T.CreateTruncating(count), _endExclusive); 48new RangeIterator<T>(_start, _start + T.CreateTruncating(count)); 55return _start + T.CreateTruncating(index); 97return _start + T.CreateTruncating(index);
System\Linq\Select.SpeedOpt.cs (4)
283_current = _selector(_start + T.CreateTruncating(index)); 339return new RangeSelectIterator<T, TResult>(_start + T.CreateTruncating(count), _end, _selector); 351return new RangeSelectIterator<T, TResult>(_start, _start + T.CreateTruncating(count), _selector); 359return _selector(_start + T.CreateTruncating(index));
System\Linq\Sequence.cs (2)
114TLarger.CreateTruncating(endInclusive) - TLarger.CreateTruncating(start) + TLarger.One <= maxValue)
System\Linq\Sum.cs (3)
221return TSource.CreateTruncating(sum); 255return TResult.CreateTruncating(sum); 292return TResult.CreateTruncating(sum);
System.Numerics.Tensors (21)
System\Numerics\Tensors\netcore\TensorOperation.cs (1)
851destination = TTo.CreateTruncating(x);
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertTruncating.cs (1)
238public static TTo Invoke(TFrom x) => TTo.CreateTruncating(x);
System\Numerics\Tensors\netcore\TensorPrimitives.Exp10.cs (3)
44public static Vector128<T> Invoke(Vector128<T> x) => ExpOperator<T>.Invoke(x * Vector128.Create(T.CreateTruncating(NaturalLog10))); 45public static Vector256<T> Invoke(Vector256<T> x) => ExpOperator<T>.Invoke(x * Vector256.Create(T.CreateTruncating(NaturalLog10))); 46public static Vector512<T> Invoke(Vector512<T> x) => ExpOperator<T>.Invoke(x * Vector512.Create(T.CreateTruncating(NaturalLog10)));
System\Numerics\Tensors\netcore\TensorPrimitives.Exp2.cs (3)
44public static Vector128<T> Invoke(Vector128<T> x) => ExpOperator<T>.Invoke(x * Vector128.Create(T.CreateTruncating(NaturalLog2))); 45public static Vector256<T> Invoke(Vector256<T> x) => ExpOperator<T>.Invoke(x * Vector256.Create(T.CreateTruncating(NaturalLog2))); 46public static Vector512<T> Invoke(Vector512<T> x) => ExpOperator<T>.Invoke(x * Vector512.Create(T.CreateTruncating(NaturalLog2)));
System\Numerics\Tensors\netcore\TensorPrimitives.Log10.cs (3)
48public static Vector128<T> Invoke(Vector128<T> x) => LogOperator<T>.Invoke(x) / Vector128.Create(T.CreateTruncating(NaturalLog10)); 49public static Vector256<T> Invoke(Vector256<T> x) => LogOperator<T>.Invoke(x) / Vector256.Create(T.CreateTruncating(NaturalLog10)); 50public static Vector512<T> Invoke(Vector512<T> x) => LogOperator<T>.Invoke(x) / Vector512.Create(T.CreateTruncating(NaturalLog10));
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (8)
326T limit = typeof(T) == typeof(float) ? T.CreateTruncating(Single_RoundLimit) : T.CreateTruncating(Double_RoundLimit); 334Vector128<T> limit = Vector128.Create(typeof(T) == typeof(float) ? T.CreateTruncating(Single_RoundLimit) : T.CreateTruncating(Double_RoundLimit)); 342Vector256<T> limit = Vector256.Create(typeof(T) == typeof(float) ? T.CreateTruncating(Single_RoundLimit) : T.CreateTruncating(Double_RoundLimit)); 350Vector512<T> limit = Vector512.Create(typeof(T) == typeof(float) ? T.CreateTruncating(Single_RoundLimit) : T.CreateTruncating(Double_RoundLimit));
System\Numerics\Tensors\netcore\TensorPrimitives.ScaleB.cs (2)
29private readonly T _pow2n = typeof(T) == typeof(float) || typeof(T) == typeof(double) ? T.Pow(T.CreateTruncating(2), T.CreateTruncating(n)) : default!;
System.Private.CoreLib (51)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
599/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
1351/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
1083/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (1)
172outputBuffer.Append(TChar.CreateTruncating(value + '0'));
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
1797/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
1332/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
713/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
754/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
751/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
746/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (6)
144TInteger newN = n + TInteger.CreateTruncating(*p++ - '0'); 365answer = TInteger.CreateTruncating(num - '0'); // first digit 391answer += TInteger.CreateTruncating(num - '0'); 425answer += TInteger.CreateTruncating(num - '0'); 611answer = TInteger.CreateTruncating(TParser.FromChar(num)); // first digit 631answer += TInteger.CreateTruncating(numValue);
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector.cs (2)
2323TResult value = TResult.CreateTruncating(low.GetElementUnsafe(i)); 2329TResult value = TResult.CreateTruncating(high.GetElementUnsafe(i - Vector<TSource>.Count));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
1331/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (2)
2623TResult value = TResult.CreateTruncating(lower.GetElementUnsafe(i)); 2629TResult value = TResult.CreateTruncating(upper.GetElementUnsafe(i - Vector128<TSource>.Count));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (2)
2716TResult value = TResult.CreateTruncating(lower.GetElementUnsafe(i)); 2722TResult value = TResult.CreateTruncating(upper.GetElementUnsafe(i - Vector256<TSource>.Count));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (2)
2741TResult value = TResult.CreateTruncating(lower.GetElementUnsafe(i)); 2747TResult value = TResult.CreateTruncating(upper.GetElementUnsafe(i - Vector512<TSource>.Count));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (2)
2709TResult value = TResult.CreateTruncating(lower.GetElementUnsafe(i)); 2715TResult value = TResult.CreateTruncating(upper.GetElementUnsafe(i - Vector64<TSource>.Count));
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (2)
348return (degrees * TVector.Create(T.Pi)) / TVector.Create(T.CreateTruncating(180)); 1690return (radians * TVector.Create(T.CreateTruncating(180))) / TVector.Create(T.Pi);
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
676/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
1080/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (6)
250TFrom SourceSignedMinValue = TFrom.CreateTruncating(1 << (8 * sizeof(TFrom) - 1)); 251Vector128<TFrom> subtractionVector = Vector128.Create(conversionIsToUpper ? (SourceSignedMinValue + TFrom.CreateTruncating('a')) : (SourceSignedMinValue + TFrom.CreateTruncating('A'))); 252Vector128<TFrom> comparisionVector = Vector128.Create(SourceSignedMinValue + TFrom.CreateTruncating(26 /* A..Z or a..z */)); 253Vector128<TFrom> caseConversionVector = Vector128.Create(TFrom.CreateTruncating(0x20)); // works both directions 458pDest[i] = TTo.CreateTruncating(element);
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Equality.cs (9)
245Vector512<TRight> loweringMask = Vector512.Create(TRight.CreateTruncating(0x20)); 246Vector512<TRight> vecA = Vector512.Create(TRight.CreateTruncating('a')); 247Vector512<TRight> vecZMinusA = Vector512.Create(TRight.CreateTruncating(('z' - 'a'))); 316Vector256<TRight> loweringMask = Vector256.Create(TRight.CreateTruncating(0x20)); 317Vector256<TRight> vecA = Vector256.Create(TRight.CreateTruncating('a')); 318Vector256<TRight> vecZMinusA = Vector256.Create(TRight.CreateTruncating(('z' - 'a'))); 388Vector128<TRight> loweringMask = Vector128.Create(TRight.CreateTruncating(0x20)); 389Vector128<TRight> vecA = Vector128.Create(TRight.CreateTruncating('a')); 390Vector128<TRight> vecZMinusA = Vector128.Create(TRight.CreateTruncating(('z' - 'a')));
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
1486/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
618/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
657/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
656/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
659/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
System.Private.Uri (25)
src\libraries\Common\src\System\Net\IPv4AddressHelper.Common.cs (1)
165if ((start + 1 < end) && name[start + 1] == TChar.CreateTruncating('0'))
src\libraries\Common\src\System\Net\IPv6AddressHelper.Common.cs (24)
117if (start < end && name[start] == TChar.CreateTruncating('[')) 129if (name[start] == TChar.CreateTruncating(':') && (start + 1 >= end || name[start + 1] != TChar.CreateTruncating(':'))) 166if (name[i] == TChar.CreateTruncating(']')) 170else if (name[i] == TChar.CreateTruncating('/')) 186if (i + 1 < end && name[i + 1] != TChar.CreateTruncating(':')) 193if (i + 3 < end && name[i + 2] == TChar.CreateTruncating('0') && name[i + 3] == TChar.CreateTruncating('x')) 221if ((i > 0) && (name[i - 1] == TChar.CreateTruncating(':'))) 325for (int i = (address[0] == TChar.CreateTruncating('[') ? 1 : 0); i < address.Length && address[i] != TChar.CreateTruncating(']');) 341for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']') && address[i] != TChar.CreateTruncating('/'); ++i) 347for (; i < address.Length && address[i] != TChar.CreateTruncating(']'); ++i) 357if (address[i] == TChar.CreateTruncating(':')) 373(address[j] != TChar.CreateTruncating(']')) && 374(address[j] != TChar.CreateTruncating(':')) && 375(address[j] != TChar.CreateTruncating('%')) && 376(address[j] != TChar.CreateTruncating('/')) && 380if (address[j] == TChar.CreateTruncating('.')) 388while (j < address.Length && (address[j] != TChar.CreateTruncating(']')) && (address[j] != TChar.CreateTruncating('/')) && (address[j] != TChar.CreateTruncating('%'))) 414for (++i; i < address.Length && address[i] != TChar.CreateTruncating(']'); i++)
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\Marshalling\ExceptionAsHResultMarshaller.cs (1)
38return T.CreateTruncating(Marshal.GetHRForException(e));
System.Runtime.Numerics (6)
System\Numerics\BigInteger.cs (1)
4060/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" />
System\Numerics\Complex.cs (5)
978/// <inheritdoc cref="INumberBase{TSelf}.CreateTruncating{TOther}(TOther)" /> 2219destination[0] = TChar.CreateTruncating('<'); 2233destination[0] = TChar.CreateTruncating(';'); 2234destination[1] = TChar.CreateTruncating(' '); 2235destination[2 + imaginaryChars] = TChar.CreateTruncating('>');
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\Symbolic\MintermClassifier.cs (1)
88lookup.AsSpan((int)start, (int)(end + 1 - start)).Fill(T.CreateTruncating(mintermId));
System.Threading.Tasks.Parallel (3)
System\Threading\Tasks\Parallel.cs (1)
1153nTotalIterations = TInt.CreateTruncating(-1); //ParallelLoopStateStopped! We can't determine this if we were stopped..
System\Threading\Tasks\ParallelRangeManager.cs (2)
186fromInclusive = TInt.CreateTruncating(fromInclusiveInt64); 187toExclusive = TInt.CreateTruncating(toExclusiveInt64);