answer to formula = NaN?

Get help using Construct 2

Post » Fri Jan 10, 2014 12:06 pm

Rereading the formula I missed a lot, haha..
But it all seems to go wrong with the square root.
Working on it!


The formulas are a bit of pseudo-code to calculate the major axis and minor axis of an ellips from it's perimeter.

z is the perimeter divided by pi and q is a percentage so a+b always add up to 100%LittleStain2014-01-10 12:07:59
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Jan 10, 2014 1:00 pm

By George, I think I've got it!

It was indeed the negative inside the square root that was ruining the party..
Added abs() instead of the missing minus (which would have worked) and all seems to be working just fine.


I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests