Clean Chinese/garbled characters in docs and comments

This commit is contained in:
yuan dian 2026-02-28 16:16:31 +08:00
parent bd891a96dd
commit 8e241688d0
3 changed files with 86 additions and 84 deletions

View file

@ -4108,10 +4108,12 @@ inline double DistanceSqrd(const IntPoint &pt1, const IntPoint &pt2) {
double DistanceFromLineSqrd(const IntPoint &pt, const IntPoint &ln1,
const IntPoint &ln2) {
// The equation of a line in general form (Ax + By + C = 0)
// given 2 points (x锟?y锟? & (x锟?y锟? is ...
//(y锟?- y锟?x + (x锟?- x锟?y + (y锟?- y锟?x锟?- (x锟?- x锟?y锟?= 0
// A = (y锟?- y锟?; B = (x锟?- x锟?; C = (y锟?- y锟?x锟?- (x锟?- x锟?y锟? // perpendicular distance of point (x锟?y锟? = (Ax锟?+ By锟?+ C)/Sqrt(A锟?+ B锟?
// The equation of a line in general form is Ax + By + C = 0.
// Given two points (x1, y1) and (x2, y2):
// (y1 - y2)x + (x2 - x1)y + (y2x1 - x2y1) = 0
// so A = (y1 - y2), B = (x2 - x1), C = (y2x1 - x2y1).
// The perpendicular distance of point (x, y) is
// (Ax + By + C) / sqrt(A^2 + B^2).
// see http://en.wikipedia.org/wiki/Perpendicular_distance
double A = double(ln1.Y - ln2.Y);
double B = double(ln2.X - ln1.X);
@ -4376,4 +4378,4 @@ std::ostream &operator<<(std::ostream &s, const Paths &p) {
}
//------------------------------------------------------------------------------
} // ClipperLib namespace
} // ClipperLib namespace