You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Fix non UTF8-encoded thirdparty files
This commit is contained in:
8
thirdparty/misc/clipper.cpp
vendored
8
thirdparty/misc/clipper.cpp
vendored
@@ -4329,10 +4329,10 @@ 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<EFBFBD>,y<EFBFBD>) & (x<EFBFBD>,y<EFBFBD>) is ...
|
||||
//(y<EFBFBD> - y<EFBFBD>)x + (x<EFBFBD> - x<EFBFBD>)y + (y<EFBFBD> - y<EFBFBD>)x<EFBFBD> - (x<EFBFBD> - x<EFBFBD>)y<EFBFBD> = 0
|
||||
//A = (y<EFBFBD> - y<EFBFBD>); B = (x<EFBFBD> - x<EFBFBD>); C = (y<EFBFBD> - y<EFBFBD>)x<EFBFBD> - (x<EFBFBD> - x<EFBFBD>)y<EFBFBD>
|
||||
//perpendicular distance of point (x<EFBFBD>,y<EFBFBD>) = (Ax<EFBFBD> + By<EFBFBD> + C)/Sqrt(A<EFBFBD> + B<EFBFBD>)
|
||||
//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²)
|
||||
//see http://en.wikipedia.org/wiki/Perpendicular_distance
|
||||
double A = double(ln1.Y - ln2.Y);
|
||||
double B = double(ln2.X - ln1.X);
|
||||
|
||||
Reference in New Issue
Block a user