4 module rt.typeinfo.ti_creal;
6 class TypeInfo_c : TypeInfo
8 override string toString() { return "creal"; }
10 override hash_t getHash(in void* p)
12 return (cast(uint *)p)[0] + (cast(uint *)p)[1] +
13 (cast(uint *)p)[2] + (cast(uint *)p)[3] +
17 static int _equals(creal f1, creal f2)
22 static int _compare(creal f1, creal f2)
27 else if (f1.re > f2.re)
29 else if (f1.im < f2.im)
31 else if (f1.im > f2.im)
38 override equals_t equals(in void* p1, in void* p2)
40 return _equals(*cast(creal *)p1, *cast(creal *)p2);
43 override int compare(in void* p1, in void* p2)
45 return _compare(*cast(creal *)p1, *cast(creal *)p2);
48 override size_t tsize()
53 override void swap(void *p1, void *p2)
58 *cast(creal *)p1 = *cast(creal *)p2;
62 override void[] init()
65 return (cast(creal *)&r)[0 .. 1];