Quote:
Originally Posted by Mirana
[You must be logged in to view images. Log in or Register.]
So I'm at work Monday and just looking at all this code (I didn't look during the weekend, I was busy playing, duh).
I'm able to decipher bits and pieces of the code but it looks like there are variables that are referenced elsewhere in the code. It's like trying to read a book in Spanish when you only know half the language.
Does anyone know how floats work? Specifically these functions
float mit_roll = MakeRandomFloat(0, mit_rating);
float atk_roll = MakeRandomFloat(0, atk_rating);
MakeRandomFloat is some sort of function with the inputs of "0" and "mit_rating" or "atk_rating" which are calculated elsewhere. What does MakeRandomFloat do?
THAC0 stands for "To Hit AC 0" correct?
|
An 'int' is a Whole Number where a float is more like a Real Number, meaning a float has a fractional component to it. i.e. 3.14159 would be represented by a float, not an int.
MakeRandomFloat(a,b) will return a random value between a and b. MakeRandomFloat(0, 10) will return a random real number between 0 and 10.
You are correct on THAC0.