Skip to content

Commit 9b3ed04

Browse files
committed
Add specs for deg2rad and rad2deg.
1 parent c7342ed commit 9b3ed04

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

doc/specs/stdlib_math.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,66 @@ Notes: Although the angle of the complex number `0` is undefined, `argpi((0,0))`
382382
{!example/math/example_math_argpi.f90!}
383383
```
384384

385+
### `deg2rad`
386+
387+
#### Status
388+
389+
Experimental
390+
391+
#### Class
392+
393+
Elemenal function.
394+
395+
`deg2rad` converts the phase angle from degree to radian.
396+
397+
#### Syntax
398+
399+
`result = ` [[stdlib_math(module):deg2rad(interface)]] `(theta)`
400+
401+
#### Arguments
402+
403+
`theta`: Shall be a `real` scalar/array.
404+
405+
#### Return value
406+
407+
Returns the `real` phase in radian
408+
409+
#### Example
410+
411+
```fortran
412+
{!example/math/example_math_deg2rad.f90!}
413+
```
414+
415+
### `rad2deg`
416+
417+
#### Status
418+
419+
Experimental
420+
421+
#### Class
422+
423+
Elemenal function.
424+
425+
`rad2deg` converts the phase angle from radian to degree.
426+
427+
#### Syntax
428+
429+
`result = ` [[stdlib_math(module):rad2deg(interface)]] `(theta)`
430+
431+
#### Arguments
432+
433+
`theta`: Shall be a `real` scalar/array.
434+
435+
#### Return value
436+
437+
Returns the `real` phase in degree.
438+
439+
#### Example
440+
441+
```fortran
442+
{!example/math/example_math_rad2deg.f90!}
443+
```
444+
385445
### `is_close` function
386446

387447
#### Description

0 commit comments

Comments
 (0)