diff --git a/docs/src/functions/math-and-trigonometry.md b/docs/src/functions/math-and-trigonometry.md index f7ef6fd..f2d8f3b 100644 --- a/docs/src/functions/math-and-trigonometry.md +++ b/docs/src/functions/math-and-trigonometry.md @@ -36,7 +36,7 @@ You can track the progress in this [GitHub issue](https://github.com/ironcalc/Ir | CSC | | – | | CSCH | | – | | DECIMAL | | – | -| DEGREES | | – | +| DEGREES | | [DEGREES](math_and_trigonometry/degrees) | | EVEN | | – | | EXP | | – | | FACT | | – | @@ -64,7 +64,7 @@ You can track the progress in this [GitHub issue](https://github.com/ironcalc/Ir | POWER | | – | | PRODUCT | | – | | QUOTIENT | | – | -| RADIANS | | – | +| RADIANS | | [RADIANS](math_and_trigonometry/radians) | | RAND | | – | | RANDARRAY | | – | | RANDBETWEEN | | – | diff --git a/docs/src/functions/math_and_trigonometry/degrees.md b/docs/src/functions/math_and_trigonometry/degrees.md index a82bcad..fce162a 100644 --- a/docs/src/functions/math_and_trigonometry/degrees.md +++ b/docs/src/functions/math_and_trigonometry/degrees.md @@ -4,9 +4,40 @@ outline: deep lang: en-US --- -# DEGREES +# DEGREES function -::: warning -🚧 This function is not yet available in IronCalc. -[Follow development here](https://github.com/ironcalc/IronCalc/labels/Functions) -::: \ No newline at end of file +## Overview +DEGREES is a function of the Math and Trigonometry category that converts an angle measured in radians to an equivalent angle measured in degrees. + +## Usage +### Syntax +**DEGREES(angle) => degrees** + +### Argument descriptions +* *angle* ([number](/features/value-types#numbers), required). The angle in radians that is to be converted to degrees. + +### Additional guidance +The conversion from radians to degrees is based on the relationship: +$$ +1~\:~\text{radian} = \dfrac{180}{\pi}~\text{degrees} \approx 57.29577951~\text{degrees} +$$ + +### Returned value +DEGREES returns a [number](/features/value-types#numbers) that represents the value of the given angle expressed in degrees. + +### Error conditions +* In common with many other IronCalc functions, DEGREES propagates errors that are found in its argument. +* If no argument, or more than one argument, is supplied, then DEGREES returns the [`#ERROR!`](/features/error-types.md#error) error. +* If the value of the *angle* argument is not (or cannot be converted to) a [number](/features/value-types#numbers), then DEGREES returns the [`#VALUE!`](/features/error-types.md#value) error. + + + + +## Links +* For more information about angle conversions, visit Wikipedia's [Degree (angle)](https://en.wikipedia.org/wiki/Degree_(angle)) page. +* See also IronCalc's [RADIANS](/functions/math_and_trigonometry/radians) function for converting degrees to radians. +* Visit Microsoft Excel's [DEGREES function](https://support.microsoft.com/en-us/office/degrees-function-4d6ec4db-e694-4b94-ace0-1cc3f61f9ba1) page. +* Both [Google Sheets](https://support.google.com/docs/answer/3093481) and [LibreOffice Calc](https://wiki.documentfoundation.org/Documentation/Calc_Functions/DEGREES) provide versions of the DEGREES function. \ No newline at end of file diff --git a/docs/src/functions/math_and_trigonometry/radians.md b/docs/src/functions/math_and_trigonometry/radians.md index 1796455..0e9674c 100644 --- a/docs/src/functions/math_and_trigonometry/radians.md +++ b/docs/src/functions/math_and_trigonometry/radians.md @@ -4,9 +4,38 @@ outline: deep lang: en-US --- -# RADIANS +# RADIANS function -::: warning -🚧 This function is not yet available in IronCalc. -[Follow development here](https://github.com/ironcalc/IronCalc/labels/Functions) -::: \ No newline at end of file +## Overview +RADIANS is a function of the Math and Trigonometry category that converts an angle measured in degrees to an equivalent angle measured in radians. + +## Usage +### Syntax +**RADIANS(angle) => radians** + +### Argument descriptions +* *angle* ([number](/features/value-types#numbers), required). The angle in degrees that is to be converted to radians. + +### Additional guidance +The conversion from degrees to radians is based on the relationship: +$$ +1~\:~\text{degree} = \dfrac{\pi}{180}~\text{radians} \approx 0.01745329252~\text{radians} +$$ + +### Returned value +RADIANS returns a [number](/features/value-types#numbers) that represents the value of the given angle expressed in radians. + +### Error conditions +* In common with many other IronCalc functions, RADIANS propagates errors that are found in its argument. +* If no argument, or more than one argument, is supplied, then RADIANS returns the [`#ERROR!`](/features/error-types.md#error) error. +* If the value of the *angle* argument is not (or cannot be converted to) a [number](/features/value-types#numbers), then RADIANS returns the [`#VALUE!`](/features/error-types.md#value) error. + + +## Links +* For more information about angle conversions, visit Wikipedia's [Radian](https://en.wikipedia.org/wiki/Radian) page. +* See also IronCalc's [DEGREES](/functions/math_and_trigonometry/degrees) function for converting radians to degrees. +* Visit Microsoft Excel's [RADIANS function](https://support.microsoft.com/en-us/office/radians-function-907f0ede-ef2e-4f7b-911a-015e2f8ab878) page. +* Both [Google Sheets](https://support.google.com/docs/answer/3093481) and [LibreOffice Calc](https://wiki.documentfoundation.org/Documentation/Calc_Functions/RADIANS) provide versions of the RADIANS function. \ No newline at end of file diff --git a/xlsx/tests/calc_tests/DEGREES_RADIANS.xlsx b/xlsx/tests/calc_tests/DEGREES_RADIANS.xlsx new file mode 100644 index 0000000..22c4266 Binary files /dev/null and b/xlsx/tests/calc_tests/DEGREES_RADIANS.xlsx differ