System.Numerics Namespace

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
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. 如基元整型ByteInt32包括MinValue和一个MaxValue属性,该定义的下限和上限的数据类型支持的属性。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.