Mercurial > hg > qm-dsp
comparison maths/MathUtilities.h @ 350:a067c2eeb13c
Add gcd
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Tue, 08 Oct 2013 17:23:17 +0100 |
parents | 50fae18236ee |
children | a694700f71d8 |
comparison
equal
deleted
inserted
replaced
349:b247af4c23d2 | 350:a067c2eeb13c |
---|---|
64 static int nextPowerOfTwo(int x); // e.g. 1300 -> 2048, 2048 -> 2048 | 64 static int nextPowerOfTwo(int x); // e.g. 1300 -> 2048, 2048 -> 2048 |
65 static int previousPowerOfTwo(int x); // e.g. 1300 -> 1024, 2048 -> 2048 | 65 static int previousPowerOfTwo(int x); // e.g. 1300 -> 1024, 2048 -> 2048 |
66 static int nearestPowerOfTwo(int x); // e.g. 1300 -> 1024, 12 -> 16 (not 8) | 66 static int nearestPowerOfTwo(int x); // e.g. 1300 -> 1024, 12 -> 16 (not 8) |
67 | 67 |
68 static int factorial(int x); | 68 static int factorial(int x); |
69 | |
70 static int gcd(int a, int b); | |
69 }; | 71 }; |
70 | 72 |
71 #endif | 73 #endif |