We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Find largest power-of-n less than or equal to given number.
Similar: isPow, prevPow, nextPow.
function prevPow(x, n) // x: a number // n: base
const xmath = require('extra-math'); xmath.prevPow(35, 2); // → 32 xmath.prevPow(35, 4); // → 16 xmath.prevPow(35, 3); // → 27