algorithmic modeling for Rhino
Tags:
new System.Random();
vs.
new System.Random(12);
//New RangedRandom class definition that inherits from System.Random
class RangedRandom : System.Random
{
//clock-seeded constructor
public RangedRandom(): base(){}
//seeded constructor
public RangedRandom(int seed): base(seed){}
public double NextDouble(double max){
return NextDouble() * max;
}
public double NextDouble(double min, double max){
return (max - min) * NextDouble() + min;
}
}
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by