Random number between 0.3 and 1 using jquery -


how tocreate random number between 0.3 , 1.

i know math.random() creates number between 0 , 1.

however im using css scale , below 0.3 small.

if want equal chance of number on range 0.3 1, then

math.random() * 0.7 + 0.3 

multiplying number 0 1 0.7 give number 0 0.7, , + 0.3 range 0.3 1.0.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -