System.Numerics 命名空間

System.Numerics 命名空間包含數值類型,可補充 .NET 所定義的數值基本類型,例如 ByteDoubleInt32 The System.Numerics namespace contains numeric types that complement the numeric primitives, such as Byte, Double, and Int32, that are defined by .NET.

類別

BitOperations

提供內建位元運算作業的公用程式方法。Provides utility methods for intrinsic bit-twiddling operations. 如果在基礎平台上可用,則這些方法會使用硬體內建;否則會使用最佳化的軟體後援。The methods use hardware intrinsics when available on the underlying platform; otherwise, they use optimized software fallbacks.

Vector

提供建立、操作、結合以及轉換泛型向量之靜態簡便方法的集合。Provides a collection of static convenience methods for creating, manipulating, combining, and converting generic vectors.

VectorExtensions

結構

BigInteger

表示任意大、帶正負號的整數。Represents an arbitrarily large signed integer.

Complex

表示複數。Represents a complex number.

Matrix3x2

表示一個 3x2 矩陣。Represents a 3x2 matrix.

Matrix4x4

表示一個 4x4 矩陣。Represents a 4x4 matrix.

Plane

表示立體空間中的平面。Represents a plane in three-dimensional space.

Quaternion

表示用來編碼三維實體旋轉的向量。Represents a vector that is used to encode three-dimensional physical rotations.

Vector<T>

表示指定數值類型的單一向量,其適用於低層級的平行演算法最佳化。Represents a single vector of a specified numeric type that is suitable for low-level optimization of parallel algorithms.

Vector2

代表具有兩個單精確度浮點值的向量。Represents a vector with two single-precision floating-point values.

Vector3

代表具有三個單精確度浮點值的向量。Represents a vector with three single-precision floating-point values.

Vector4

代表具有四個單精確度浮點值的向量。Represents a vector with four single-precision floating-point values.

備註

此命名空間包含下列類型:This namespace includes the following types:

  • BigInteger結構,也就是基本型的整數類資料類型支援任意大的整數。The BigInteger structure, which is a nonprimitive integral type that supports arbitrarily large integers. 整數類資料的基本類型,例如Byte或是Int32包含MinValueMaxValue屬性,定義該資料類型所支援的上限與下限。An integral primitive such as Byte or Int32 includes a MinValue and a MaxValue property, which define the lower bound and upper bound supported by that data type. 相反地,BigInteger結構沒有下限或上限,而且可以包含的任何整數值。In contrast, the BigInteger structure has no lower or upper bound, and can contain the value of any integer.

  • Complex結構,代表複數。The Complex structure, which represents a complex number. 複數是表單的數字 + bi,其中是實數部分,並b是虛數部分。A complex number is a number in the form a + bi, where a is the real part, and b is the imaginary part.

  • 啟用 SIMD 的向量型別,包括Vector2Vector3Vector4Matrix3x2Matrix4x4Plane,和QuaternionThe SIMD-enabled vector types, which include Vector2, Vector3, Vector4, Matrix3x2, Matrix4x4, Plane, and Quaternion.