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

Commit fc36562

Browse files
committed
Merge pull request #5 from purescript/updates
Update docs, use no-prelude
2 parents d2e12e0 + ea1361f commit fc36562

File tree

9 files changed

+333
-278
lines changed

9 files changed

+333
-278
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/.*
22
!/.gitignore
3+
!/.travis.yml
34
/bower_components/
45
/node_modules/
56
/output/

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: node_js
2+
node_js:
3+
- 0.10
4+
env:
5+
- PATH=$HOME/purescript:$PATH
6+
install:
7+
- TAG=$(wget -q -O - https://github.com/purescript/purescript/releases/latest --server-response --max-redirect 0 2>&1 | sed -n -e 's/.*Location:.*tag\///p')
8+
- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$TAG/linux64.tar.gz
9+
- tar -xvf $HOME/purescript.tar.gz -C $HOME/
10+
- chmod a+x $HOME/purescript
11+
- npm install bower gulp -g
12+
- npm install && bower install
13+
script:
14+
- gulp

Gruntfile.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 214 deletions
Original file line numberDiff line numberDiff line change
@@ -1,222 +1,15 @@
1-
# Module Documentation
1+
# purescript-math
22

3-
## Module Math
3+
[![Build Status](https://travis-ci.org/purescript/purescript-math.svg?branch=master)](https://travis-ci.org/purescript/purescript-math)
44

5+
Math functions.
56

6-
Wraps the math functions and constants from Javascript's built-in `Math` object.
7-
See [Math Reference at MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math).
7+
## Installation
88

9-
#### `Radians`
10-
11-
``` purescript
12-
type Radians = Number
13-
```
14-
15-
An alias to make types in this module more explicit.
16-
17-
#### `abs`
18-
19-
``` purescript
20-
abs :: Number -> Number
21-
```
22-
23-
Returns the absolute value of the argument.
24-
25-
#### `acos`
26-
27-
``` purescript
28-
acos :: Number -> Radians
29-
```
30-
31-
Returns the inverse cosine of the argument.
32-
33-
#### `asin`
34-
35-
``` purescript
36-
asin :: Number -> Radians
37-
```
38-
39-
Returns the inverse sine of the argument.
40-
41-
#### `atan`
42-
43-
``` purescript
44-
atan :: Number -> Radians
45-
```
46-
47-
Returns the inverse tangent of the argument.
48-
49-
#### `atan2`
50-
51-
``` purescript
52-
atan2 :: Number -> Number -> Radians
53-
```
54-
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.
58-
If the first argument is negative, the result will be negative.
59-
The result is the angle between the positive x axis and a point `(x, y)`.
60-
61-
#### `ceil`
62-
63-
``` purescript
64-
ceil :: Number -> Number
65-
```
66-
67-
Returns the smallest integer not smaller than the argument.
68-
69-
#### `cos`
70-
71-
``` purescript
72-
cos :: Radians -> Number
73-
```
74-
75-
Returns the cosine of the argument.
76-
77-
#### `exp`
78-
79-
``` purescript
80-
exp :: Number -> Number
81-
```
82-
83-
Returns `e` exponentiated to the power of the argument.
84-
85-
#### `floor`
86-
87-
``` purescript
88-
floor :: Number -> Number
89-
```
90-
91-
Returns the largest integer not larger than the argument.
92-
93-
#### `log`
94-
95-
``` purescript
96-
log :: Number -> Number
97-
```
98-
99-
Returns the natural logarithm of a number.
100-
101-
#### `max`
102-
103-
``` purescript
104-
max :: Number -> Number -> Number
105-
```
106-
107-
Returns the largest of two numbers.
108-
109-
#### `min`
110-
111-
``` purescript
112-
min :: Number -> Number -> Number
113-
```
114-
115-
Returns the smallest of two numbers.
116-
117-
#### `pow`
118-
119-
``` purescript
120-
pow :: Number -> Number -> Number
121-
```
122-
123-
Return the first argument exponentiated to the power of the second argument.
124-
125-
#### `round`
126-
127-
``` purescript
128-
round :: Number -> Number
129-
```
130-
131-
Returns the integer closest to the argument.
132-
133-
#### `sin`
134-
135-
``` purescript
136-
sin :: Radians -> Number
137-
```
138-
139-
Returns the sine of the argument.
140-
141-
#### `sqrt`
142-
143-
``` purescript
144-
sqrt :: Number -> Number
1459
```
146-
147-
Returns the square root of the argument.
148-
149-
#### `tan`
150-
151-
``` purescript
152-
tan :: Radians -> Number
10+
bower install purescript-math
15311
```
15412

155-
Returns the tangent of the argument.
156-
157-
#### `e`
158-
159-
``` purescript
160-
e :: Number
161-
```
162-
163-
The base of natural logarithms, *e*, around 2.71828.
164-
165-
#### `ln2`
166-
167-
``` purescript
168-
ln2 :: Number
169-
```
170-
171-
The natural logarithm of 2, around 0.6931.
172-
173-
#### `ln10`
174-
175-
``` purescript
176-
ln10 :: Number
177-
```
178-
179-
The natural logarithm of 10, around 2.3025.
180-
181-
#### `log2e`
182-
183-
``` purescript
184-
log2e :: Number
185-
```
186-
187-
The base 2 logarithm of `e`, around 1.4426.
188-
189-
#### `log10e`
190-
191-
``` purescript
192-
log10e :: Number
193-
```
194-
195-
Base 10 logarithm of `e`, around 0.43429.
196-
197-
#### `pi`
198-
199-
``` purescript
200-
pi :: Number
201-
```
202-
203-
The ratio of the circumference of a circle to its diameter, around 3.14159.
204-
205-
#### `sqrt1_2`
206-
207-
``` purescript
208-
sqrt1_2 :: Number
209-
```
210-
211-
The Square root of one half, around 0.707107.
212-
213-
#### `sqrt2`
214-
215-
``` purescript
216-
sqrt2 :: Number
217-
```
218-
219-
The square root of two, around 1.41421.
220-
221-
13+
## Module documentation
22214

15+
- [Math](docs/Math.md)

bower.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111
"bower_components",
1212
"node_modules",
1313
"output",
14-
"tests",
15-
"tmp",
1614
"bower.json",
17-
"Gruntfile.js",
15+
"gulpfile.js",
1816
"package.json"
1917
]
2018
}

0 commit comments

Comments
 (0)