Run spell check over solution

This commit is contained in:
RoosterDragon
2021-12-05 16:22:22 +00:00
committed by reaperrr
parent b3d290edd9
commit 727084c5fc
31 changed files with 34 additions and 34 deletions

View File

@@ -97,7 +97,7 @@ namespace OpenRA.Mods.Common
// It falls where t = [(point - target) . (source - target)] / |source - target|^2
// The normal DotProduct math would be (xDiff + yDiff) / dist, where dist = (target - source).LengthSquared;
// But in order to avoid floating points, we do not divide here, but rather work with the large numbers as far as possible.
// We then later divide by dist, only AFTER we have multiplied by the dotproduct.
// We then later divide by dist, only AFTER we have multiplied by the dot product.
var xDiff = ((long)point.X - lineEnd.X) * (lineStart.X - lineEnd.X);
var yDiff = ((long)point.Y - lineEnd.Y) * (lineStart.Y - lineEnd.Y);
var t = xDiff + yDiff;