You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Licensed under the Apache License, Version 2.0 (the "License");
8
8
you may not use this file except in compliance with the License.
@@ -18,9 +18,13 @@ limitations under the License.
18
18
19
19
-->
20
20
21
-
# Sine
21
+
# sind
22
22
23
-
> Compute the [sine][sine] of a number.
23
+
> Computes the [sine][trigonometric-functions] of an angle measured in degrees, for a double-precision floating-point number.
24
+
25
+
<sectionclass="intro">
26
+
27
+
</section>
24
28
25
29
<sectionclass="usage">
26
30
@@ -32,17 +36,20 @@ var sind = require( '@stdlib/math/base/special/sind' );
32
36
33
37
#### sind( x )
34
38
35
-
Computes the [sine][sine] of a `number` (in degress).
39
+
Computes the [sine][trigonometric-functions] of an angle measured in degrees, for a double-precision floating-point number.
36
40
37
41
```javascript
38
42
var v =sind( 0.0 );
39
-
// returns ~0.0
43
+
// returns 0.0
44
+
45
+
v =sind( 30.0 );
46
+
// returns 0.5
40
47
41
-
v =sind( 90 );
42
-
// returns ~1.0
48
+
v =sind( 90.0 );
49
+
// returns 1.0
43
50
44
-
v =sind( -30 );
45
-
// returns ~-0.5
51
+
v =sind( NaN );
52
+
// returns NaN
46
53
```
47
54
48
55
</section>
@@ -59,7 +66,7 @@ v = sind( -30 );
59
66
var linspace =require( '@stdlib/array/base/linspace' );
60
67
var sind =require( '@stdlib/math/base/special/sind' );
61
68
62
-
var x =linspace( 0.0, 360, 555 );
69
+
var x =linspace( -180, 180, 100 );
63
70
64
71
var i;
65
72
for ( i =0; i <x.length; i++ ) {
@@ -71,17 +78,97 @@ for ( i = 0; i < x.length; i++ ) {
71
78
72
79
<!-- /.examples -->
73
80
74
-
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
75
-
76
-
<sectionclass="related">
81
+
<!-- C interface documentation. -->
77
82
78
83
* * *
79
84
80
-
## See Also
85
+
<sectionclass="c">
86
+
87
+
## C APIs
88
+
89
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
90
+
91
+
<sectionclass="intro">
92
+
93
+
</section>
94
+
95
+
<!-- /.intro -->
96
+
97
+
<!-- C usage documentation. -->
98
+
99
+
<sectionclass="usage">
100
+
101
+
### Usage
102
+
103
+
```c
104
+
#include"stdlib/math/base/special/sind.h"
105
+
```
81
106
82
-
- <spanclass="package-name">[`@stdlib/math/base/special/cos`][@stdlib/math/base/special/cos]</span><spanclass="delimiter">: </span><spanclass="description">compute the cosine of a number.</span>
83
-
- <spanclass="package-name">[`@stdlib/math/base/special/sin`][@stdlib/math/base/special/sin]</span><spanclass="delimiter">: </span><spanclass="description">compute the sine of a number.</span>
84
-
- <spanclass="package-name">[`@stdlib/math/base/special/tan`][@stdlib/math/base/special/tan]</span><spanclass="delimiter">: </span><spanclass="description">evaluate the tangent of a number.</span>
107
+
#### stdlib_base_sind( x )
108
+
109
+
Computes the [sine][trigonometric-functions] of an angle measured in degrees, for a double-precision floating-point number.
110
+
111
+
```c
112
+
double out = stdlib_base_sind( 0.0 );
113
+
// returns 0.0
114
+
115
+
out = stdlib_base_sind( 30.0 );
116
+
// returns 0.5
117
+
```
118
+
119
+
The function accepts the following arguments:
120
+
121
+
-**x**: `[in] double` input value.
122
+
123
+
```c
124
+
doublestdlib_base_sind( const double x );
125
+
```
126
+
127
+
</section>
128
+
129
+
<!-- /.usage -->
130
+
131
+
<!-- C API usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
0 commit comments