Clamping value using Math library JavaScript

You may be never heard about clamping value in JavaScript. Yes correct its because there is nothing built in available in JavaScript to clamp the values. Here I have shared few options how we can define clamp function with Math library. Option 1: Readable

Option 2: Compact with readable

Option 3 : More […]

Finding Second Largest Number From Array in JavaScript

While working on one of the client project, I just wrote a functions to find 1st and 2nd Largest Numbers in JavaScript. And I would like to share with you one of them which demonstrates how to find second largest number using javascript.

Rotating A Gun Barrel towards The Target using ActionScript Trigonometric functions

As I already discussed in my previous post, based on trigonometric function, CREATING ROLLING EYES USING TRIGNOMETRIC FUNCTIONS. Here is the simple and small example on the same topic I am going to share with you. You guys might be or some time played any shooting games like firing the bullets on the target or […]

ActionScript 3 Timer Event vs Enter Frame Event

While playing the flash games, I always notice one thing.The thing is some objects need to move from one place to another place within a given time. Suppose, You are playing a car racing game, and your aim is need to complete your lap within 5 seconds.But what will happen if your flash player will […]

Creating Rolling Eyes using ActionScript Trigonometric functions

Creating rolling eyes towards mouse is quite easy, but you need to know little math. I mean few trigonometry concepts and functions in ActionScript. But how we can implement trigonometry using ActionScript. Let’s see how it is. First find the radian of the angle, you can find out the radian using math class [as3] var […]