Page 1 of 1

More suggested features for 3.0

Posted: Mon Jul 30, 2007 6:51 pm
by toxikman
Several people have already suggested parameters, and even conditionals based on those parameters. Those ideas are great, as well as the idea of context-free expressions to help generate relative values. The expression that I REALLY want is RAND(a, b). This would save so much code when it comes to generating random values in a range.

Code: Select all

RULE branch(@param)
{
    SQUARE { s 0.1 1 }
    branch { y 1 r (@param * RAND(0.5, 1)) s 0.99 }
    branch { y 1 r (@param * RAND(-1, -0.5)) s 0.99 }
}

Posted: Tue Aug 07, 2007 7:57 pm
by LazyMoon
A random function would save so much time.

Seeing as a lot of us have been using multiple rules with minute changes all this time to accomplish the same thing.

I think the random function should have three arguments though, the min value, the max value and a step value. So that way you can generate a random number between 1 and 2, yet confine the result so it only appears as multiples of 0.10; i.e. 1.10, 1.20, 1.30 etc.

Posted: Wed Aug 08, 2007 10:12 am
by toxikman
Yes, a step would be very helpful indeed.

Posted: Wed Aug 08, 2007 5:26 pm
by MtnViewJohn
A random integer function would be easier to implement and more generally useful (in addition to a random float function).