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