-
Hi !
Im writing on a Flash to calculate angles and sides of a triangle !
I have the following variable fields on the stage:
adjacent = 60
opposite = 1185
hypotenuse = (will be calculated)
sina = (will be calculated - is the sine of alpha)
asin = (will be calculated - is the arc sine of alpha in degree)
my button:
on (release) {
hypotenuse = Math.sqrt ( Math.pow (parseInt(_root.:adjacent), 2)+Math.pow ( parseInt(_root.pposite), 2));
_root.:hypo = hypotenuse;
sina = parseInt(_root.pposite) / parseInt(hypotenuse);
_root.:sina = sina;
_root.:asin = Math.asin (Number(sina));
}
for my values - sina = 0.0505681323332334
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|