Reputation: 760
I am looking for a PHP function to get the "step_size".
Example:
0.00001000 = 5
0.00000100 = 6
0.00010000 = 4
Thanks for your time :)
Martijn
Upvotes: 0
Views: 65
Reputation: 306
Martijn!
You can use basic log function:
// 5
echo log(0.00001000, 0.1);
// 6
echo log(0.00000100, 0.1);
// 4
echo log(0.00010000, 0.1);
Upvotes: 1
Reputation: 16771
This looks like a log10() function. This code:
echo log10(1.0 / 0.00001000);
echo log10(1.0 / 0.00000100);
echo log10(1.0 / 0.00010000);
Will return 564
.
Then again this might totally not be what you want.
Upvotes: 1