Author Archive

When I am writing a flash app or game which uses the keyboard to control a character's movement, there is a situation that becomes annoying while controlling the character. I do not know the proper term for it ("sticky keys"?) but I will describe it...keyboard

When an app or game is written we "expect" the user to precisely press the proper key or key combination at a time to execute programmatic actions. However, most of us have ten fingers and we use more than one finger to press more than one button on the keyboard. The expected program reaction from multiple fingered keyboard input might not occur because you have another function executing when you expect just one at a time.
Read the rest of this entry »

Vote in HexoSearch

Comments 15 Comments »

This post might seem of little importance to some but today I was thinking back to my high school days and (vaguely) remember the 4 quadrants of a Cartesian coordinate plane discussed in class. Depending on the positive or negative sign of a Point's X and Y value, that point in the Cartesian coordinate plane will be located in one of these 4 quadrants.

Quadrant 1 = (+,+)
Quadrant 2 = (-,+)
Quadrant 3 = (-,-)
Quadrant 4 = (-,+)

My interest in this post is about the positive or negative sign of what the Cosine, Sine, and Tangent functions return for the same angle...the angle from one Point to another Point. The sign of these 3 Math functions are different also whenever a Point is located in one of the 4 quadrants.

Quadrant 1 = +Sine,+Cosine,+Tangent
Quadrant 2 = +Sine,-Cosine,-Tangent
Quadrant 3 = -Sine,-Cosine,+Tangent
Quadrant 4 = -Sine,+Cosine,-Tangent

Personally I don't think the order or name of the quadrants are important, as long as you keep them consistent with the coordinate system. For my usage, I order my quadrants "1,2,3,4" clockwise since ActionScript's radians values go clockwise.

I feel this will become useful sometime in the future for me when dealing with angles of Points and determining their positions relative to each other.
In a future situation I might not be given X and Y information, but may only have angle data instead. Seeing the difference of signs from the Cosign, Sine, Tangent output of the angle value will be helpful clues.

So some things come back to haunt you, if they are the ghosts of my math teachers, I will surely pay attention in class this time :) .

Get Adobe Flash player


Read the rest of this entry »

Vote in HexoSearch

Comments 2 Comments »

Since you are visiting, I will take this chance to say Happy New Year to you.
I am writing this on the event horizon of a new year. 2009 taught me that each day is a gift and we are not promised a tomorrow. Yes, this sounds so cliché but it is something a lot of us can relate to. That's pretty much all I have to say right now, so have a safe happy time...and a awesome HAPPY NEW YEAR!

-- Keith H --

Vote in HexoSearch

Comments No Comments »

Thanks for visiting www.keith-hair.net