Cosmetics

This commit is contained in:
Bertrand Songis
2017-01-18 07:37:06 +01:00
parent 55ee19b50a
commit e740a88e13
+10 -5
View File
@@ -470,18 +470,23 @@ unsigned int expou(unsigned int x, unsigned int k)
int expo(int x, int k) int expo(int x, int k)
{ {
if (k == 0) return x; if (k == 0) {
return x;
}
int y; int y;
bool neg = (x < 0); bool neg = (x < 0);
if (neg) x = -x; if (neg) {
if (k<0) { x = -x;
y = RESXu-expou(RESXu-x, -k); }
if (k < 0) {
y = RESXu - expou(RESXu-x, -k);
} }
else { else {
y = expou(x, k); y = expou(x, k);
} }
return neg? -y : y; return neg ? -y : y;
} }
point_t getPoint(uint8_t i) point_t getPoint(uint8_t i)