[bb] Calculate Sound Pan by Murilo [ 1+ years ago ]

Started by BlitzBot, June 29, 2017, 00:28:40

Previous topic - Next topic

BlitzBot

Title : Calculate Sound Pan
Author : Murilo
Posted : 1+ years ago

Description : Note: Formula has been tweaked slightly by Entity.

Code :
Code (blitzbasic) Select
Function CalculateSoundPan#(iX%)

; Returns a value in the range -1 to 1 representing "iX" on the screen

Return 2 * iX / Float(GraphicsWidth - 1) - 1

End Function


Comments : none...