From a340e2654be2ee55d6453a83b13db9e867bc2234 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 28 Jul 2019 13:23:09 +0900 Subject: [PATCH] Improved docs --- README.md | 10 +++++----- desktop/sources/scripts/library.js | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e87607b..971d6f7 100644 --- a/README.md +++ b/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. diff --git a/desktop/sources/scripts/library.js b/desktop/sources/scripts/library.js index 12487b1..5dbdb9d 100644 --- a/desktop/sources/scripts/library.js +++ b/desktop/sources/scripts/library.js @@ -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)