|
@ -15,6 +15,7 @@ def rad2deg(radNumber): |
|
|
return (radNumber * 180) / math.pi |
|
|
return (radNumber * 180) / math.pi |
|
|
|
|
|
|
|
|
def sin_approx_bhaskara(radNumber): |
|
|
def sin_approx_bhaskara(radNumber): |
|
|
|
|
|
|
|
|
while(radNumber > 2 * math.pi): |
|
|
while(radNumber > 2 * math.pi): |
|
|
radNumber -= 2 * math.pi |
|
|
radNumber -= 2 * math.pi |
|
|
|
|
|
|
|
@ -23,6 +24,10 @@ def sin_approx_bhaskara(radNumber): |
|
|
radNumber = subract(math.pi, radNumber) |
|
|
radNumber = subract(math.pi, radNumber) |
|
|
shallFlipTheResult = 1 |
|
|
shallFlipTheResult = 1 |
|
|
|
|
|
|
|
|
|
|
|
if 0 > radNumber > -2*math.pi: |
|
|
|
|
|
radNumber *= -1 |
|
|
|
|
|
shallFlipTheResult = 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
num = multiply(16, radNumber) |
|
|
num = multiply(16, radNumber) |
|
|
num = multiply(num, subract(radNumber, math.pi)) |
|
|
num = multiply(num, subract(radNumber, math.pi)) |
|
|