Created
August 31, 2016 16:50
-
-
Save rankun203/bd602d031fa2febbee9d917ee9f66311 to your computer and use it in GitHub Desktop.
Calc message bubble width with a log2 function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = 30; | |
var width = 1 - 1 / Math.log2(x + 1); | |
console.log(width); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment