math question
- PrettyMuchBryce
-
PrettyMuchBryce
- Member since: Mar. 17, 2001
- Offline.
-
- Forum Stats
- Member
- Level 06
- Blank Slate
Im trying to figure out what the width and height of a square is if I rotate it 45 degrees.
For example the square the top is 100 units^2
if I rotate it 45 degrees what is the width and height of the outline?
- LeechmasterB
-
LeechmasterB
- Member since: Apr. 1, 2005
- Offline.
-
- Forum Stats
- Member
- Level 17
- Blank Slate
At 11/18/10 02:00 PM, PrettyMuchBryce wrote: Im trying to figure out what the width and height of a square is if I rotate it 45 degrees.
For example the square the top is 100 units^2
if I rotate it 45 degrees what is the width and height of the outline?
var diameter:Number = Math.sqrt(top * top + top* top); - smileinyoursleep
-
smileinyoursleep
- Member since: Feb. 19, 2008
- Offline.
-
- Forum Stats
- Member
- Level 26
- Blank Slate
141.4 if nyou want me to show you how i did it just ask
- smileinyoursleep
-
smileinyoursleep
- Member since: Feb. 19, 2008
- Offline.
-
- Forum Stats
- Member
- Level 26
- Blank Slate
btw that is rounded off, if you wanted it excat you would have to use an equation
- I-smel
-
I-smel
- Member since: Mar. 2, 2006
- Offline.
-
- Forum Stats
- Member
- Level 01
- Game Developer
The _width and _height properties in Flash tell you the width n height of something no matter which way you spin it.
So if you did
trace(square._width);
trace(square._height);
Then it'd show 100 100. If you rotated it and did
trace(square._width);
trace(square._height);
again it'd show 141.4 141.4 or whatever.
- MichaelJ
-
MichaelJ
- Member since: Mar. 2, 2009
- Offline.
-
- Forum Stats
- Member
- Level 18
- Voice Actor
- PrettyMuchBryce
-
PrettyMuchBryce
- Member since: Mar. 17, 2001
- Offline.
-
- Forum Stats
- Member
- Level 06
- Blank Slate
At 11/18/10 04:39 PM, Animator1mike wrote: Pythagorean Theorem. XD
if pythagoras were alive today his games would be really good
- Spysociety
-
Spysociety
- Member since: Dec. 30, 2009
- Offline.
-
- Forum Stats
- Member
- Level 21
- Blank Slate
if pythagoras were alive today his games would be really good
If Hipparcus were alive today his games would be the best on line!
- Redshift
-
Redshift
- Member since: Feb. 12, 2005
- Offline.
-
- Forum Stats
- Member
- Level 15
- Programmer
#include <stdio.h>
char*p="#include <stdio.h>%cchar*p=%c%s%c;%cmain() {printf(p,10,34,p,34,10);}";
main() {printf(p,10,34,p,34,10);}
- PrettyMuchBryce
-
PrettyMuchBryce
- Member since: Mar. 17, 2001
- Offline.
-
- Forum Stats
- Member
- Level 06
- Blank Slate
At 11/18/10 02:07 PM, LeechmasterB wrote: var diameter:Number = Math.sqrt(top * top + top* top);
Also this is the correct answer. Thanks Leechmaster.
This is a little more descriptive.
var diameter:Number = Math.sqrt((width * height) + (width* height));



