Code archives/Algorithms/Interpolate Angles

This code has been declared by its author to be Public Domain code.

Download source code

Interpolate Angles by fredborg2005
Interpolate between two angles...
Function interpolate_angle#(a#,b#,blend#=0.5)
	ix# = Sin(a)
	iy# = Cos(a)
	jx# = Sin(b)
	jy# = Cos(b)
	Return ATan2(ix-(ix-jx)*blend,iy-(iy-jy)*blend)
End Function

Comments

Filax2005
Any example ?


Robert Cummings2006
Thanks fredborg, it's a lifesaver.

Is there a faster way of achieving this?


Code Archives Forum