X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Frational.h;h=9fe8f1f5f44b0e45b2b0111274165e8486644b85;hp=41cce09078b4e96eb17a6bb6e28478ea64637b57;hb=ee5287fabfb214e8f7b483cde424108270525fd7;hpb=00ef152dc3a065e37fe45c1cd8023d739f518b8e diff --git a/src/rational.h b/src/rational.h index 41cce09..9fe8f1f 100644 --- a/src/rational.h +++ b/src/rational.h @@ -71,7 +71,7 @@ struct Rational { if (Q < 0) { - P = (P < 0) ? -P : P; + P = -P; Q = -Q; } if (P == 0)