shallFlipTheResult=False#the bhaskara function can only be used between zero and pi. For the rest of the sin period I simply mirrored the first arch of the curve to match the actual sine wave
if(radNumber<0):
radNumber*=-1
shallFlipTheResult=notshallFlipTheResult
while(radNumber>2*math.pi):
radNumber-=2*math.pi
shallFlipTheResult=0#the bhaskara function can only be used between zero and pi. For the rest of the sin period I simply mirrored the first arch of the curve to match the actual sine wave