public static Vector2 Direction(this IRNG rng) { var vector = new Vector2 { x = rng.Float(), y = rng.Float() }; return(vector.normalized); }
public float Sample(IRNG random) { var point = random.Float(); var curvePoint = this.curve.Evaluate(point); return(Mathf.Lerp(this.minimum, this.maximum, curvePoint)); }
public float Sample(IRNG random) => random.Float();
public static bool Flip(this IRNG rng, float probability = 0.5f) { return(rng.Float() < probability); }