1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
5 using System.Runtime.CompilerServices;
7 namespace System.Numerics
9 internal class ConstantHelper
11 [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
12 public static Byte GetByteWithAllBitsSet()
19 *((Byte*)&value) = (Byte)0xff;
24 [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
25 public static SByte GetSByteWithAllBitsSet()
32 *((SByte*)&value) = (SByte)0xff;
37 [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
38 public static UInt16 GetUInt16WithAllBitsSet()
45 *((UInt16*)&value) = (UInt16)0xffff;
50 [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
51 public static Int16 GetInt16WithAllBitsSet()
58 *((Int16*)&value) = (Int16)0xffff;
63 [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
64 public static UInt32 GetUInt32WithAllBitsSet()
71 *((UInt32*)&value) = (UInt32)0xffffffff;
76 [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
77 public static Int32 GetInt32WithAllBitsSet()
84 *((Int32*)&value) = (Int32)0xffffffff;
89 [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
90 public static UInt64 GetUInt64WithAllBitsSet()
97 *((UInt64*)&value) = (UInt64)0xffffffffffffffff;
102 [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
103 public static Int64 GetInt64WithAllBitsSet()
110 *((Int64*)&value) = (Int64)0xffffffffffffffff;
115 [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
116 public static Single GetSingleWithAllBitsSet()
123 *((Int32*)&value) = (Int32)0xffffffff;
128 [MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
129 public static Double GetDoubleWithAllBitsSet()
136 *((Int64*)&value) = (Int64)0xffffffffffffffff;