public struct PointF : IEquatable<PointF>
Optimized for graphics programming where high performance with moderate precision is required. Provides all essential vector operations while maintaining memory efficiency.
针对需要中等精度高性能的图形编程而优化, 提供了所有必要的向量运算,同时保持内存效率。
var pointA = new PointF(1.5f, 2.5f);
var pointB = new PointF(3.0f, 4.0f);
float distance = (float)pointA.DistanceTo(pointB);
PointF sum = pointA + pointB;
PointF | Represents a single-precision floating-point 2D point with geometric operations 表示具有几何运算的单精度浮点二维点 |
Add | Vector addition (component-wise) 向量加法(分量相加) |
CrossProduct(PointF) | Calculates cross product with another vector (returns double precision) 计算与另一个向量的叉积(返回双精度) |
CrossProduct(PointF, PointF) | Calculates 2D cross product magnitude (returns double precision) 计算二维叉积大小(返回双精度) |
Distance | Calculates Euclidean distance between two points (returns double precision) 计算两点之间的欧几里得距离(返回双精度) |
DistanceTo | Calculates distance to another point (returns double precision) 计算到另一个点的距离(返回双精度) |
DotProduct(PointF) | Calculates dot product with another vector (returns double precision) 计算与另一个向量的点积(返回双精度) |
DotProduct(PointF, PointF) | Calculates dot product of two vectors (returns double precision) 计算两个向量的点积(返回双精度) |
Equals | Determines if two points are exactly equal 确定两个点是否完全相等 |
GetType | Gets the Type of the current instance. (继承自 Object。) |
Multiply | Scales the point by a double-precision factor (returns float) 使用双精度因子缩放点(返回浮点) |
Negate | Negates both coordinates (additive inverse) 对两个坐标取反(加法逆元) |
Plus | Identity operation - returns the point unchanged 恒等运算 - 返回未改变的点 |
Subtract | Vector subtraction (component-wise) 向量减法(分量相减) |
ToString |
Returns a string representation of the point
返回点的字符串表示形式
(重写 ValueTypeToString) |
Addition(PointF, PointF) | Vector addition operator 向量加法运算符 |
Multiply(PointF, Double) | Scalar multiplication operator 标量乘法运算符 |
Subtraction(PointF, PointF) | Vector subtraction operator 向量减法运算符 |
UnaryNegation(PointF) | Unary negation operator 一元取反运算符 |
UnaryPlus(PointF) | Unary plus operator - returns the point unchanged 一元加运算符 - 返回未改变的点 |
X | The X-coordinate (single-precision floating-point) X坐标(单精度浮点) |
Y | The Y-coordinate (single-precision floating-point) Y坐标(单精度浮点) |