10 Ιαν 2018 - object you created ( Math is not a constructor). This function is the equivalent of Math.log(x) / Math.log(2). For log2(e) use the constant Math..