Improved docs
This commit is contained in:
parent
7bd740f257
commit
a340e2654b
10
README.md
10
README.md
@ -56,7 +56,7 @@ Ronin helpers are keywords that facilitates adding coordinates from the canvas i
|
||||
- `(line ax ay bx by)` Returns a line shape.
|
||||
- `(text x y p t ~a ~f)` Returns a text shape.
|
||||
- `(svg x y d)` Returns a svg shape.
|
||||
- `(offset a b)` Returns the offset between two pos.
|
||||
- `(offset a b)` Offsets pos a with pos b, returns a.
|
||||
- `(stroke shape color ~thickness)` Strokes a shape.
|
||||
- `(fill ~rect)` Fills a shape.
|
||||
- `(gradient line ~colors 'black'])` Defines a gradient color.
|
||||
@ -88,13 +88,13 @@ Ronin helpers are keywords that facilitates adding coordinates from the canvas i
|
||||
- `(mod a b)` Returns the modulo of a and b.
|
||||
- `(clamp val min max)` Clamps a value between min and max.
|
||||
- `(step val step)`
|
||||
- `(min)`
|
||||
- `(max)`
|
||||
- `(ceil)`
|
||||
- `(min)` Clamp value from.
|
||||
- `(max)` Clamp value at.
|
||||
- `(ceil)` Round up to the nearest integer.
|
||||
- `(floor)` Round down to the nearest integer.
|
||||
- `(sin)`
|
||||
- `(cos)`
|
||||
- `(log)` Caclulates on the base of e.
|
||||
- `(log)` Caclulates on the base.
|
||||
- `(pow a b)` Calculates a^b.
|
||||
- `(sqrt)` Calculate the square root.
|
||||
- `(sq a)` Calculate the square.
|
||||
|
@ -82,7 +82,7 @@ function Library (ronin) {
|
||||
return { x, y, d }
|
||||
}
|
||||
|
||||
this.offset = (a, b) => { // Returns the offset between two pos.
|
||||
this.offset = (a, b) => { // Offsets pos a with pos b, returns a.
|
||||
a.x += b.x
|
||||
a.y += b.y
|
||||
return a
|
||||
@ -266,11 +266,11 @@ function Library (ronin) {
|
||||
return Math.round(val / step) * step
|
||||
}
|
||||
|
||||
this.min = Math.min
|
||||
this.min = Math.min // Clamp value from.
|
||||
|
||||
this.max = Math.max
|
||||
this.max = Math.max // Clamp value at.
|
||||
|
||||
this.ceil = Math.ceil
|
||||
this.ceil = Math.ceil // Round up to the nearest integer.
|
||||
|
||||
this.floor = Math.floor // Round down to the nearest integer.
|
||||
|
||||
@ -278,7 +278,7 @@ function Library (ronin) {
|
||||
|
||||
this.cos = Math.cos
|
||||
|
||||
this.log = Math.log // Caclulates on the base of e.
|
||||
this.log = Math.log // Caclulates on the base.
|
||||
|
||||
this.pow = (a, b) => { // Calculates a^b.
|
||||
return Math.pow(a, b)
|
||||
|
Loading…
x
Reference in New Issue
Block a user