I need to make function that will have 10% that variable (in this case its float) will be 0, and 90% that it will be 1.
How to??? :(
I have:
float reflection;
if (angle <= Brewster_angle){
(it will have 100% chanse to reflect)
reflection = 1;
}
else {
it will have 90% chanse to reflect, and 10% chanse to transmit)
reflection = ....
}
i.e.:
value for reflection is 1 or 0; if angle>Brewster_angle there is 90% chanse that float reflection = 1, and 10% chanse that float reflection = 0.