[gatest] Use correct layout for multivector reverse

This fixes a bit of fun with reversing directly specified blades.
This commit is contained in:
Bill Currie 2024-06-06 22:26:44 +09:00
parent b3fed7282e
commit 5771cfb2ff

View file

@ -302,7 +302,7 @@ static MultiVector *new_mv (Algebra *algebra, BasisLayout *layout)
int g = [b grade];
unsigned mask = [b mask];
double s = g & 2 ? -1 : 1;//FIXME do in BasisBlade?
int ind = [layout bladeIndex:mask];
int ind = [reverse.layout bladeIndex:mask];
reverse.components[ind] += s * c;
}
return reverse;