aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/lib/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/lib/math')
-rw-r--r--src/kernel/lib/math/pow.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/kernel/lib/math/pow.c b/src/kernel/lib/math/pow.c
index 24670a0..5cdcfa5 100644
--- a/src/kernel/lib/math/pow.c
+++ b/src/kernel/lib/math/pow.c
@@ -1,10 +1,13 @@
int pow(int base, int exp)
{
- if (exp < 0) return 0;
+ if (exp < 0)
+ return 0;
- if (!exp) return 1;
+ if (!exp)
+ return 1;
- int ret = base;
- for (int i = 1; i < exp; i++) ret *= base;
- return ret;
+ int ret = base;
+ for (int i = 1; i < exp; i++)
+ ret *= base;
+ return ret;
} \ No newline at end of file