diff options
author | cookedm <cookedm@localhost> | 2007-12-14 22:19:54 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2007-12-14 22:19:54 +0000 |
commit | 8e82b0429ed0fbd5049d48446da29a1fa55d5907 (patch) | |
tree | 03f05dab08011906a9113f2e05c245f7bebc22a6 /numpy/core/src/umathmodule.c.src | |
parent | d3c469c90bfe792ca0cfe283bcbf0e8fd24dab96 (diff) | |
download | numpy-8e82b0429ed0fbd5049d48446da29a1fa55d5907.tar.gz |
Add degrees() and radians() ufuncs
Diffstat (limited to 'numpy/core/src/umathmodule.c.src')
-rw-r--r-- | numpy/core/src/umathmodule.c.src | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/numpy/core/src/umathmodule.c.src b/numpy/core/src/umathmodule.c.src index 5e24d89a8..ec531e0e5 100644 --- a/numpy/core/src/umathmodule.c.src +++ b/numpy/core/src/umathmodule.c.src @@ -413,6 +413,25 @@ rint (double x) #define isfinitef(x) (!(isinff((x)) || isnanf((x)))) #define isfinitel(x) (!(isinfl((x)) || isnanl((x)))) +float degreesf(float x) { + return x * (float)(180.0/M_PI); +} +double degrees(double x) { + return x * (180.0/M_PI); +} +longdouble degreesl(longdouble x) { + return x * (180.0L/M_PI); +} + +float radiansf(float x) { + return x * (float)(M_PI/180.0); +} +double radians(double x) { + return x * (M_PI/180.0); +} +longdouble radiansl(longdouble x) { + return x * (M_PI/180.0L); +} /* First, the C functions that do the real work */ |