I was looking at the generated code pga2d.cs
for 2D Projective Geometric Algebra in C# and noticed the following line
/// <summary>
/// PGA2D.inorm()
/// Calculate the Ideal norm. (signed)
/// </summary>
public float inorm()
{
return this[1] != 0.0f ? this[1] : this[15] != 0.0f ? this[15] : (!this).norm();
}
Given that in 2D PGA contains only 8 floats, it seems obvious that the code generator has a bug and it produces this[15]
instead of this[7]
to pull this anti-scalar value out.