witam
Chciałem się was zapytać czemu w poniższej funkcji rzutującej dokładność wartości liczbowych jest bardzo przeciętna i czemu jak float chce rzutować na short to pomimo że float jest ok. 0.23... to short pokazuje 0 :(
public static implicit operator Konto(float a)
{
int tmpzl = (int)a;
float tmpgrfloat = a-tmpzl;
Console.WriteLine("gr: {0}",tmpgrfloat);
short tmpgr = (short)(tmpgrfloat);
//Console.WriteLine(tmpgr);
return new Konto(tmpzl, tmpgr);
}