php random into from -1 to 1 code example
Example 1: how to generate random between 0 and 9 in c
#include <stdio.h>
#include <stdlib.h>
int main()
{
int randomnumber;
srand(time(NULL));
randomnumber = rand() % 10;
printf("%d\n", randomnumber);
return 0;
}
Example 2: c# random number between 0 and 1
Random rand = new Random();
return rand.NextDouble; //returns a random number bw 0.0 and 1.0!