Code archives/Algorithms/Interpolate Angles

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

Download source code

Interpolate Angles by fredborg
(Posted 22 years ago)
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

Filax
(Posted 21 years ago)
Any example ?

Rob Cummings
(Posted 21 years ago)
Thanks fredborg, it's a lifesaver.

Is there a faster way of achieving this?

Code Archives Forum