Macaulay2 Engine
Loading...
Searching...
No Matches

◆ compare_elems()

int M2::ARingCC::compare_elems ( const ElementType & f,
const ElementType & g ) const
inline

Definition at line 113 of file aring-CC.hpp.

114 {
115 double cmp_re = f.re - g.re;
116 if (cmp_re < 0) return -1;
117 if (cmp_re > 0) return 1;
118 double cmp_im = f.im - g.im;
119 if (cmp_im < 0) return -1;
120 if (cmp_im > 0) return 1;
121 return 0;
122 }

References cc_doubles_struct::im, and cc_doubles_struct::re.