Skip to content

Commit 73c1e25

Browse files
Update trig examples to use pi
1 parent 626e299 commit 73c1e25

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/Data/Number.purs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,22 +125,22 @@ foreign import abs :: Number -> Number
125125

126126
-- | Returns the inverse cosine in radians of the argument.
127127
-- | ```purs
128-
-- | > acos 0.0 - pi / 2.0
129-
-- | 0.0
128+
-- | > acos 0.0 == pi / 2.0
129+
-- | true
130130
-- | ```
131131
foreign import acos :: Number -> Number
132132

133133
-- | Returns the inverse sine in radians of the argument.
134134
-- | ```purs
135-
-- | > asin 0.0
136-
-- | 0.0
135+
-- | > asin 1.0 == pi / 2.0
136+
-- | true
137137
-- | ```
138138
foreign import asin :: Number -> Number
139139

140140
-- | Returns the inverse tangent in radians of the argument.
141141
-- | ```purs
142-
-- | > atan 0.0
143-
-- | 0.0
142+
-- | > atan 1.0 == pi / 4.0
143+
-- | true
144144
-- | ```
145145
foreign import atan :: Number -> Number
146146

@@ -152,6 +152,8 @@ foreign import atan :: Number -> Number
152152
-- | ```purs
153153
-- | > atan2 0.0 1.0
154154
-- | 0.0
155+
-- | > atan2 1.0 0.0 == pi / 2.0
156+
-- | true
155157
-- | ```
156158
foreign import atan2 :: Number -> Number -> Number
157159

@@ -164,8 +166,8 @@ foreign import ceil :: Number -> Number
164166

165167
-- | Returns the cosine of the argument, where the argument is in radians.
166168
-- | ```purs
167-
-- | > cos 0.0
168-
-- | 1.0
169+
-- | > cos (pi / 4.0) == sqrt2 / 2.0
170+
-- | true
169171
-- | ```
170172
foreign import cos :: Number -> Number
171173

@@ -235,8 +237,8 @@ foreign import sign :: Number -> Number
235237

236238
-- | Returns the sine of the argument, where the argument is in radians.
237239
-- | ```purs
238-
-- | > sin 0.0
239-
-- | 0.0
240+
-- | > sin (pi / 2.0)
241+
-- | 1.0
240242
-- | ```
241243
foreign import sin :: Number -> Number
242244

@@ -249,8 +251,8 @@ foreign import sqrt :: Number -> Number
249251

250252
-- | Returns the tangent of the argument, where the argument is in radians.
251253
-- | ```
252-
-- | > tan 0.0
253-
-- | 0.0
254+
-- | > tan (pi / 4.0)
255+
-- | 0.9999999999999999
254256
-- | ```
255257
foreign import tan :: Number -> Number
256258

0 commit comments

Comments
 (0)