View Single Post
Old 03-25-14, 11:03 AM   #3047
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
You're hung up on something. The code I posted is a linear function. I tested it in the debugger to ensure it was linear. Giving available light as 0.499999 results in minimum signal strength of original minimum signal strength. Giving available light as 0.283 (game's nighttime value) results in minimum signal strength * 3.0. Giving available light as 0.3915 (half-way point) results in minimum signal strength * 1.5.
At last we are talking again the same (universal) language: numbers

Quote:
Originally Posted by TheDarkWraith View Post
How is that not linear?
you forget something:

our extremes are minimum signal strength and minimum signal strength * 3.
Divide both terms by minimum signal strength and you get 1 and 3. The midpoint between 1 and 3 is not 1.5; it is 2

Maybe (yet another) graphical comparison between my function (in blue) and your one (in red), can help:

__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote