
Welcome Guest
|
#1
|
||||
|
||||
|
I've run into something very strange.
I wrote a small loop to start from -1 and stop at 0 by using a step of .05. Actionscript:
for (var j = -1; j <= 0; j += .05) {
trace(j);
}However my output is not what to be expected Code:
-1 -0.95 -0.9 -0.85 -0.8 -0.75 -0.7 -0.65 -0.6 -0.55 -0.5 -0.45 -0.4 -0.35 -0.3 -0.25 -0.2 -0.15 -0.0999999999999997 -0.0499999999999997 Is this bad math? Is this correct math and why? |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Controlling Looping MovieClip Forward and Reverse a Set Number of Frames | bkasty | ActionScript 3.0 |
0 | 08-12-2007 08:48 PM |
| math locgic need help bad | demdps | Flash MX ActionScript |
3 | 12-21-2002 04:53 AM |
| String Arrays to Number Arrays for Math Purpose | dv8 | Flash 5 Actionscript |
2 | 04-04-2002 10:44 PM |
| How to calculate a negative random number | midjdji | Flash 5 Actionscript |
15 | 10-21-2001 06:01 PM |
| Number to Negative power | MixMatch | Flash 5 Actionscript |
4 | 10-15-2001 10:23 AM |






