diff options
Diffstat (limited to 'src/c/elementaryFunctions/Trigonometry/cosd')
4 files changed, 59 insertions, 4 deletions
diff --git a/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c b/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c index b48876e..65a6f4a 100644 --- a/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c +++ b/src/c/elementaryFunctions/Trigonometry/cosd/dcosda.c @@ -1,14 +1,24 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + #include "cosd.h" #include <math.h> void dcosda(double* in,int size,double* out) { - double val=0.0; - val =3.14159265/180.0; int i=0; for (i=0;i<size;i++) { - out[i] = cos(in[i]*val); + out[i] = dcosds(in[i]); } } diff --git a/src/c/elementaryFunctions/Trigonometry/cosd/dcosds.c b/src/c/elementaryFunctions/Trigonometry/cosd/dcosds.c index 4550757..8bc6d4a 100644 --- a/src/c/elementaryFunctions/Trigonometry/cosd/dcosds.c +++ b/src/c/elementaryFunctions/Trigonometry/cosd/dcosds.c @@ -1,3 +1,19 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifdef _WIN32 + #define _USE_MATH_DEFINES +#endif + #include <math.h> #include "cos.h" #include "cosd.h" diff --git a/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c b/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c index 5224899..7e0714d 100644 --- a/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c +++ b/src/c/elementaryFunctions/Trigonometry/cosd/scosda.c @@ -1,7 +1,20 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + #include "cos.h" #include "cosd.h" -void scosda(float* in, int size, float* out) { +void scosda(float* in, int size, float* out) +{ int i = 0; for (i = 0; i < size; ++i) { out[i] = scosds(in[i]); diff --git a/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c b/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c index e99a195..45c788f 100644 --- a/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c +++ b/src/c/elementaryFunctions/Trigonometry/cosd/scosds.c @@ -1,3 +1,19 @@ +/* Copyright (C) 2016 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Shamik Guha + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +#ifdef _WIN32 + #define _USE_MATH_DEFINES +#endif + #include <math.h> #include "cosd.h" #include "cos.h" |