• Got a Tipila, google, windows live or facebook account ?

Ex. If 540 degrees need to be clamped between -360 to 360 => ClampAngle(540, 360) Similarly if you want to clamp -75 between -180 to 180 => ClampAngle(-75,180)

fn ClampAngle(angle, betweenAngle){
 return angle%betweenAngle;
}
1
votes
Hi...!!!

Tipila is a site for programmers to save interesting things found on the web, as Tips.

No more wasting time by re-googling for things you've found but forgotten.

It's totally free...
Get started now

Login to Tipila