View Full Version : Trying to modify a script-not sure what this means...

06-01-2006, 02:03 AM
Hi all,

I'm trying to modify a script that I posted on here ( - Jscript: HalfKill (Deletes -X) and I'm not sure what something means..

I forget where I got that script from - I didn't write it. I want to change it so it deletes +X instead of -X.

// Array off point where pointPositionX < almost 0 [-1E-5]
var delPoints = new Array();
var pointIndex;
var pointPositionX;
for (i=0, pointIndex = 0; i < pArray.length; i += 3, pointIndex++) {
pointPositionX = pArray[i];
if (pointPositionX < -1E-5) {

I changed it to: if (pointPositionX > 0) { and it works for what I want it to do.

My question is, what does almost 0 [-1E-5] mean??

06-01-2006, 07:58 AM
It means Epsilon. 00000.1

ie, a very small number.


/edit - sorry, missed the sign. in this case [-1E-5] means -0.00001

06-01-2006, 08:14 AM
-1E-5 = -1x10(exp -5) = -0.00001
It's just a diverent way off writing a small number. try logmessage(-1E-5)

for more info about Scientific- and exponential notation see:

06-01-2006, 02:54 PM
ah. Thanks for the 1 x 10 ^ (-5) example. Makes perfect sense now. :)

CGTalk Moderation
06-01-2006, 02:54 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.