Skip to content
This repository was archived by the owner on Jun 5, 2022. It is now read-only.

Commit 69b4a4f

Browse files
committed
cleanup
1 parent e0dd5ec commit 69b4a4f

File tree

2 files changed

+36
-38
lines changed

2 files changed

+36
-38
lines changed

README.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,44 +28,43 @@ Returns the absolute value of the argument.
2828
acos :: Number -> Radians
2929
```
3030

31-
Returns the arccosine of the argument.
31+
Returns the inverse cosine of the argument.
3232

3333
#### `asin`
3434

3535
``` purescript
3636
asin :: Number -> Radians
3737
```
3838

39-
Returns the arcsine of the argument.
39+
Returns the inverse sine of the argument.
4040

4141
#### `atan`
4242

4343
``` purescript
4444
atan :: Number -> Radians
4545
```
4646

47-
Returns the arctangent of the argument.
47+
Returns the inverse tangent of the argument.
4848

4949
#### `atan2`
5050

5151
``` purescript
5252
atan2 :: Number -> Number -> Radians
5353
```
5454

55-
Four-quadrant tangent inverse. Given `y` and `x`, returns the arctangent of
56-
`y / x`, where the signs of both arguments are used to determine the sign
57-
of the result.
55+
Four-quadrant tangent inverse. Given the arguments `y` and `x`, returns
56+
the inverse tangent of `y / x`, where the signs of both arguments are used
57+
to determine the sign of the result.
5858
If the first argument is negative, the result will be negative.
59-
The result is the counterclockwise angle between the positive x axis and
60-
the point `(x, y)`.
59+
The result is the angle between the positive x axis and a point `(x, y)`.
6160

6261
#### `ceil`
6362

6463
``` purescript
6564
ceil :: Number -> Number
6665
```
6766

68-
Returns the smallest integer greater than or equal to the argument.
67+
Returns the smallest integer not smaller than the argument.
6968

7069
#### `cos`
7170

@@ -89,7 +88,7 @@ Returns `e` exponentiated to the power of the argument.
8988
floor :: Number -> Number
9089
```
9190

92-
Returns the largest integer less than or equal to the argument.
91+
Returns the largest integer not larger than the argument.
9392

9493
#### `log`
9594

@@ -129,7 +128,7 @@ Return the first argument exponentiated to the power of the second argument.
129128
round :: Number -> Number
130129
```
131130

132-
Returns the integer nearest to the argument.
131+
Returns the integer closest to the argument.
133132

134133
#### `sin`
135134

@@ -161,63 +160,63 @@ Returns the tangent of the argument.
161160
e :: Number
162161
```
163162

164-
Euler's constant and the base of natural logarithms, approximately 2.718.
163+
The base of natural logarithms, *e*, around 2.71828.
165164

166165
#### `ln2`
167166

168167
``` purescript
169168
ln2 :: Number
170169
```
171170

172-
Natural logarithm of 2, approximately 0.693.
171+
The natural logarithm of 2, around 0.6931.
173172

174173
#### `ln10`
175174

176175
``` purescript
177176
ln10 :: Number
178177
```
179178

180-
Natural logarithm of 10, approximately 2.303.
179+
The natural logarithm of 10, around 2.3025.
181180

182181
#### `log2e`
183182

184183
``` purescript
185184
log2e :: Number
186185
```
187186

188-
Base 2 logarithm of `e`, approximately 1.443.
187+
The base 2 logarithm of `e`, around 1.4426.
189188

190189
#### `log10e`
191190

192191
``` purescript
193192
log10e :: Number
194193
```
195194

196-
Base 10 logarithm of `e`, approximately 0.434.
195+
Base 10 logarithm of `e`, around 0.43429.
197196

198197
#### `pi`
199198

200199
``` purescript
201200
pi :: Number
202201
```
203202

204-
Ratio of the circumference of a circle to its diameter, approximately 3.14159.
203+
The ratio of the circumference of a circle to its diameter, around 3.14159.
205204

206205
#### `sqrt1_2`
207206

208207
``` purescript
209208
sqrt1_2 :: Number
210209
```
211210

212-
Square root of 1/2, approximately 0.707.
211+
The Square root of one half, around 0.707107.
213212

214213
#### `sqrt2`
215214

216215
``` purescript
217216
sqrt2 :: Number
218217
```
219218

220-
Square root of 2, approximately 1.414.
219+
The square root of two, around 1.41421.
221220

222221

223222

src/Math.purs

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,28 @@ type Radians = Number
88
-- | Returns the absolute value of the argument.
99
foreign import abs "var abs = Math.abs;" :: Number -> Number
1010

11-
-- | Returns the arccosine of the argument.
11+
-- | Returns the inverse cosine of the argument.
1212
foreign import acos "var acos = Math.acos;" :: Number -> Radians
1313

14-
-- | Returns the arcsine of the argument.
14+
-- | Returns the inverse sine of the argument.
1515
foreign import asin "var asin = Math.asin;" :: Number -> Radians
1616

17-
-- | Returns the arctangent of the argument.
17+
-- | Returns the inverse tangent of the argument.
1818
foreign import atan "var atan = Math.atan;" :: Number -> Radians
1919

20-
-- | Four-quadrant tangent inverse. Given `y` and `x`, returns the arctangent of
21-
-- | `y / x`, where the signs of both arguments are used to determine the sign
22-
-- | of the result.
20+
-- | Four-quadrant tangent inverse. Given the arguments `y` and `x`, returns
21+
-- | the inverse tangent of `y / x`, where the signs of both arguments are used
22+
-- | to determine the sign of the result.
2323
-- | If the first argument is negative, the result will be negative.
24-
-- | The result is the counterclockwise angle between the positive x axis and
25-
-- | the point `(x, y)`.
24+
-- | The result is the angle between the positive x axis and a point `(x, y)`.
2625
foreign import atan2
2726
"function atan2(y){\
2827
\ return function (x) {\
2928
\ return Math.atan2(y, x);\
3029
\ };\
3130
\}" :: Number -> Number -> Radians
3231

33-
-- | Returns the smallest integer greater than or equal to the argument.
32+
-- | Returns the smallest integer not smaller than the argument.
3433
foreign import ceil "var ceil = Math.ceil;" :: Number -> Number
3534

3635
-- | Returns the cosine of the argument.
@@ -39,7 +38,7 @@ foreign import cos "var cos = Math.cos;" :: Radians -> Number
3938
-- | Returns `e` exponentiated to the power of the argument.
4039
foreign import exp "var exp = Math.exp;" :: Number -> Number
4140

42-
-- | Returns the largest integer less than or equal to the argument.
41+
-- | Returns the largest integer not larger than the argument.
4342
foreign import floor "var floor = Math.floor;" :: Number -> Number
4443

4544
-- | Returns the natural logarithm of a number.
@@ -69,7 +68,7 @@ foreign import pow
6968
\ }\
7069
\}" :: Number -> Number -> Number
7170

72-
-- | Returns the integer nearest to the argument.
71+
-- | Returns the integer closest to the argument.
7372
foreign import round "var round = Math.round;" :: Number -> Number
7473

7574
-- | Returns the sine of the argument.
@@ -81,26 +80,26 @@ foreign import sqrt "var sqrt = Math.sqrt;" :: Number -> Number
8180
-- | Returns the tangent of the argument.
8281
foreign import tan "var tan = Math.tan;" :: Radians -> Number
8382

84-
-- | Euler's constant and the base of natural logarithms, approximately 2.718.
83+
-- | The base of natural logarithms, *e*, around 2.71828.
8584
foreign import e "var e = Math.E;" :: Number
8685

87-
-- | Natural logarithm of 2, approximately 0.693.
86+
-- | The natural logarithm of 2, around 0.6931.
8887
foreign import ln2 "var ln2 = Math.LN2;" :: Number
8988

90-
-- | Natural logarithm of 10, approximately 2.303.
89+
-- | The natural logarithm of 10, around 2.3025.
9190
foreign import ln10 "var ln10 = Math.LN10;" :: Number
9291

93-
-- | Base 2 logarithm of `e`, approximately 1.443.
92+
-- | The base 2 logarithm of `e`, around 1.4426.
9493
foreign import log2e "var log2e = Math.LOG2E;" :: Number
9594

96-
-- | Base 10 logarithm of `e`, approximately 0.434.
95+
-- | Base 10 logarithm of `e`, around 0.43429.
9796
foreign import log10e "var log10e = Math.LOG10E;" :: Number
9897

99-
-- | Ratio of the circumference of a circle to its diameter, approximately 3.14159.
98+
-- | The ratio of the circumference of a circle to its diameter, around 3.14159.
10099
foreign import pi "var pi = Math.PI;" :: Number
101100

102-
-- | Square root of 1/2, approximately 0.707.
101+
-- | The Square root of one half, around 0.707107.
103102
foreign import sqrt1_2 "var sqrt1_2 = Math.SQRT1_2;" :: Number
104103

105-
-- | Square root of 2, approximately 1.414.
104+
-- | The square root of two, around 1.41421.
106105
foreign import sqrt2 "var sqrt2 = Math.SQRT2;" :: Number

0 commit comments

Comments
 (0)