Description:
I have created a small project that generates random navbar designs. Part of the randomality is the border-radius
of the navbar can range from 0
to 100
. But once you start going over 5 pixels on the border radius you can really start to see the curvature of the border. 5 out of 100 is very small so 95% of the time there will be a very noticeable curve on the navbar that randomly generates. How can I tone down the 95% without changing the range of 0
to 100
? So the navbar has a larger chance to generate with a sharp edge.
Code:
var borderRadius = Math.floor(Math.random() * 100) + 0;