refactoring: used a comment to explain the shifting of the curve as I see no way to make that clear with variable names. Furthermore, used the already implemented basic calculating operations to reduce duplication of code
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