mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 15:30:50 +00:00
[gatest] Use the metric when computing the dot product
As the dot product is a metric product, using the metric is vital to getting the correct results. This fixes the calculation of the closest point on a line to a point other than the origin (and a whole pile of other issues, I imagine).
This commit is contained in:
parent
d01fc27dd5
commit
7c9b6aa0cc
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ static MultiVector *new_mv (Algebra *algebra, BasisLayout *layout)
|
|||
double rc = rhs.components[j];
|
||||
BasisBlade *rb = [rhs.layout bladeAt:j];
|
||||
int rg = [rb grade];
|
||||
BasisBlade *b = [lb geometricProduct:rb];
|
||||
BasisBlade *b = [lb geometricProduct:rb metric:[algebra metric]];
|
||||
int g = [b grade];
|
||||
if ((lg <= rg) && (g != rg - lg)) {
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue