-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
80 additions
and
218 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from math import fabs | ||
from math import pi | ||
|
||
#弧度角度转换函数 | ||
def radian2angle(x): | ||
return 180*x/(pi) | ||
|
||
def angle2radian(x): | ||
return x*(pi)/180 | ||
|
||
#三角函数计算函数 | ||
def sin(x): | ||
g = 0 | ||
t = x | ||
n = 1 | ||
while (fabs(t) >= 1e-10): | ||
g += t | ||
n += 1 | ||
t = -t * x * x / (2 * n - 1) / (2 * n - 2) | ||
return g | ||
|
||
def cos(x): | ||
x = 1.57079 - x | ||
return sin(x) | ||
|
||
def tan(x): | ||
return sin(x)/cos(x) | ||
|
||
def cot(x): | ||
return cos(x)/sin(x) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.