public FlagColor(string Name, Culture Culture, Color Color, float Strength) { _Name = Name; _Culture = Culture; _Color = Color; _Strength = Strength; double Total = 0; for (int i = 0; i < 64; ++i) { int I = (i & 32) >> 5; int Ind = (i & 16) >> 4; int L = (i & 8) >> 3; int P = (i & 4) >> 2; int T = (i & 2) >> 1; int U = (i & 1); Culture C = new Culture(I, Ind, L, P, T, U); Total += C.DistanceTo(Culture); } _Distance = (float)(Total / 64); }
public float DistanceTo(Culture Culture) { return((float)_Culture.DistanceTo(Culture) / (_Strength * _Distance)); }