Skip to content

Commit

Permalink
esablishing documentation style
Browse files Browse the repository at this point in the history
  • Loading branch information
Squeakrats committed Feb 23, 2016
1 parent b0408d1 commit 3fad719
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 9 deletions.
21 changes: 14 additions & 7 deletions docs/engine/math/vec2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,31 @@ This class defines a 2d vector.

## Constructors

### vec2( x, y )
x - Float representing the x value of the vector.
y - Float representing the y value of the vector.
### vec2( [x](/primitives.md#Number), [y](/primitives.md#Number) )
[x](/primitives.md#Number) - Initial x value of the vector.
[y](/primitives.md#Number) - Initial y value of the vector.

```javascript
let a = new vec2(1, 2);
```

### static zero()


## Properties
.[x](/primitives.md#Number) - Value of the x component.
.[y](/primitives.md#Number) - Value of the y component.



## Static Methods
### zero()
Constructs the zero vector.

```javascript
let a = vec2.zero();
```

## Properties
### .x
### .y


##Methods

Expand Down
2 changes: 0 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Welcome to CruftEngine

For full source code visit [Github](https://github.com/mjneil/CruftEngine).


32 changes: 32 additions & 0 deletions docs/primitives.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Built in data types in Javascript.



### Number
```javascript
let a = 1;
let b = 1.23456;
let c = a + b; //c = 2.23456
```

### Boolean
```javascript
let a = 1;
let b = 1.23456;
let c = a + b; //c = 2.23456
```

### String
```javascript
let a = "Cruft";
let b = "Engine";
let c = a + b; // c = "CruftEngine"
```

### Object
```javascript
let a = {
Cruft : true,
Engine :false
}
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ pages:
- vec3 : 'engine/math/vec3.md'
- mat3 : 'engine/math/mat3.md'
- mat4 : 'engine/math/mat4.md'
- Primitives : 'primitives.md'

0 comments on commit 3fad719

Please sign in to comment.