Please use. NET 5,. NET 6, NET 7,. NET 8, NET Framework 4.6, NET Framework 4.61, NET Framework 4.7, NET Framework 4.72, NET Framework 4.8, NET Framework 4.81, and. NET Core 3.1 versions

PointD 结构

Represents a high-precision 2D point with double-precision coordinates and advanced geometric operations 表示具有双精度坐标和高级几何运算的高精度二维点

Definition

命名空间: DeploySharp.Data
程序集: DeploySharp (在 DeploySharp.dll 中) 版本:0.0.4+6e8a2e904469617cd59619d666c0e272985c0e33
C#
public struct PointD : IEquatable<PointD>
Inheritance
Object    ValueType    PointD
Implements
IEquatablePointD

备注

Provides high-precision geometric operations essential for computational geometry, graphics transformations, and scientific calculations.

为计算几何、图形变换和科学计算提供必要的高精度几何运算。

示例

Basic usage:
C#
var p1 = new PointD(1.5, 2.5);
var p2 = new PointD(3.0, 4.0);
double distance = p1.DistanceTo(p2);
PointD sum = p1 + p2;

构造函数

PointD Represents a high-precision 2D point with double-precision coordinates and advanced geometric operations 表示具有双精度坐标和高级几何运算的高精度二维点

方法

Add Performs vector addition (component-wise) 执行向量加法(分量相加)
CrossProduct(PointD) Calculates cross product magnitude with another vector 计算与另一个向量的叉积大小
CrossProduct(PointD, PointD) Calculates the 2D cross product magnitude 计算二维叉积大小
Distance Calculates the Euclidean distance between two points 计算两点之间的欧几里得距离
DistanceTo Calculates distance from this point to another 计算从该点到另一点的距离
DotProduct(PointD) Calculates dot product with another vector 计算与另一个向量的点积
DotProduct(PointD, PointD) Calculates the dot product of two vectors 计算两个向量的点积
Equals Compares two points for exact equality (bitwise comparison) 比较两点是否完全相等(按位比较)
GetTypeGets the Type of the current instance.
(继承自 Object。)
Multiply Scales the point by a multiplicative factor 按乘数因子缩放点
Negate Negates both coordinates (returns additive inverse) 取反两个坐标(返回加法逆元)
Plus Returns the point unchanged (identity operation) 返回未更改的点(恒等运算)
Subtract Performs vector subtraction (component-wise) 执行向量减法(分量相减)
ToString Returns a string representation of the point with high precision 返回点的高精度字符串表示
(重写 ValueTypeToString)

运算符

Addition(PointD, PointD) Vector addition operator 向量加法运算符
Multiply(PointD, Double) Scalar multiplication operator 标量乘法运算符
Subtraction(PointD, PointD) Vector subtraction operator 向量减法运算符
UnaryNegation(PointD) Unary negation operator 一元取反运算符
UnaryPlus(PointD) Unary plus operator (identity operation) 一元加运算符(恒等运算)

字段

X The X-coordinate with double precision 双精度的X坐标
Y The Y-coordinate with double precision 双精度的Y坐标

参见