mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
[gatest] Switch to using e0 for the null vector
According to enki (bivector community) when there are more than one null vector in a geometry, usually all vectors are null, and it was what to do with multiple null vectors that caused me to balk at using e0 for the null vector. However, using e0 for the null vector makes life much easier, especially as that's what most of the literature does. There are plenty of places, particularly in layout handling, that still need adjustment for the change, but things seem to work (minus duals, but they were broken in the first place, thus the discussion with enki).
This commit is contained in:
parent
fe045f75fb
commit
68ca8c7016
3 changed files with 5 additions and 5 deletions
|
@ -90,7 +90,7 @@
|
|||
|
||||
for (int i = 0; i < 32; i++) {
|
||||
if (mask & (1 << i)) {
|
||||
basis += sprintf("%x", i + 1);
|
||||
basis += sprintf("%x", i);
|
||||
}
|
||||
}
|
||||
if (basis) {
|
||||
|
|
|
@ -237,7 +237,7 @@ factor ()
|
|||
BasisBlade *blade = [BasisBlade basis:0];
|
||||
pos = 0;
|
||||
while (is_digit (str_mid (blade_str, pos, pos + 1))) {
|
||||
int x = str_char (blade_str, pos++) - '1';
|
||||
int x = str_char (blade_str, pos++) - '0';
|
||||
BasisBlade *new = [BasisBlade basis:1 << x];
|
||||
blade = [blade outerProduct:new];
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
+(Metric *)R:(int)p, int m, int z
|
||||
{
|
||||
Metric *metric = [[[Metric alloc] init] autorelease];
|
||||
metric.plus = (1 << p) - 1;
|
||||
metric.minus = ((1 << m) - 1) << p;
|
||||
metric.zero = ((1 << z) - 1) << (p + m);
|
||||
metric.plus = ((1 << p) - 1) << z;
|
||||
metric.minus = ((1 << m) - 1) << (z + p);
|
||||
metric.zero = (1 << z) - 1;
|
||||
return metric;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue