[Mono-list] System.Drawing.Drawing2D
Lloyd Dupont
lloyd@ukibi.com
Fri, 24 Aug 2001 11:42:23 +0200
just look at your code:
public override int GetHashCode()
{
// TODO: find a better hash function than det(M)
return (int)(m[0] * m[3] - m[2] * m[1]);
}
mhh, a problem is that det(Mat) would be equal to product of eigen
value, and there is specific value for this, for example rotation
matrix would have det = 1.
why not something like
public unsafe override int GetHashCode()
{
fixed(float * fp = m) {
int * ip = (int *) fp;
return ip[0] ^ ip[1] ^ ip[2] ^ ip[3];
}
}