lundi 28 mars 2016

Random Number with NextDouble (C#)

I'm programming a perceptron and really need to get the range from the normal NextDouble (0, 1) to (-0.5, 0.5). Problem is, I'm using an array and I'm not sure whether it is possible. Hopefully that's enough information.

Random rdm = new Random();

double[] weights = {rdm.NextDouble(), rdm.NextDouble(), rdm.NextDouble()};




Aucun commentaire:

Enregistrer un commentaire