From a0466548df16792fc35b2916a6284d9b25515271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E6=9C=A8?= Date: Mon, 21 Jun 2021 21:24:20 +0800 Subject: [PATCH] fix(typos): fix typos show up in docs --- src/core/constants.js | 4 ++-- src/core/internationalization.js | 2 +- src/core/main.js | 2 +- src/core/preload.js | 2 +- src/core/reference.js | 2 +- src/core/transform.js | 10 +++++----- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core/constants.js b/src/core/constants.js index a1ce957205..11ed698877 100644 --- a/src/core/constants.js +++ b/src/core/constants.js @@ -155,7 +155,7 @@ export const TAU = _PI * 2; export const TWO_PI = _PI * 2; /** * Constant to be used with angleMode() function, to set the mode which - * p5.js interprates and calculates angles (either DEGREES or RADIANS). + * p5.js interprets and calculates angles (either DEGREES or RADIANS). * @property {String} DEGREES * @final * @@ -169,7 +169,7 @@ export const TWO_PI = _PI * 2; export const DEGREES = 'degrees'; /** * Constant to be used with angleMode() function, to set the mode which - * p5.js interprates and calculates angles (either RADIANS or DEGREES). + * p5.js interprets and calculates angles (either RADIANS or DEGREES). * @property {String} RADIANS * @final * diff --git a/src/core/internationalization.js b/src/core/internationalization.js index 7c98055182..8dc868f882 100644 --- a/src/core/internationalization.js +++ b/src/core/internationalization.js @@ -104,7 +104,7 @@ FetchResources.type = 'backend'; /** * This is our translation function. Give it a key and - * it will retreive the appropriate string + * it will retrieve the appropriate string * (within supported languages) according to the * user's browser's language settings. * @function translator diff --git a/src/core/main.js b/src/core/main.js index 8dc84ca4b3..b88445e2eb 100644 --- a/src/core/main.js +++ b/src/core/main.js @@ -377,7 +377,7 @@ class p5 { !this._loop || time_since_last >= target_time_between_frames - epsilon ) { - //mandatory update values(matrixs and stack) + //mandatory update values(matrixes and stack) this.redraw(); this._frameRate = 1000.0 / (now - this._lastFrameTime); this.deltaTime = now - this._lastFrameTime; diff --git a/src/core/preload.js b/src/core/preload.js index e8bf9dab9f..b4c8310ef5 100644 --- a/src/core/preload.js +++ b/src/core/preload.js @@ -81,7 +81,7 @@ p5.prototype._wrapPromisePreload = function(thisValue, fn, addCallbacks) { callback = args.pop(); } } - // Call the underlying funciton and pass it to Promise.resolve, + // Call the underlying function and pass it to Promise.resolve, // so that even if it didn't return a promise we can still // act on the result as if it did. const promise = Promise.resolve(fn.apply(this, args)); diff --git a/src/core/reference.js b/src/core/reference.js index 4f6c62a987..0ff45a3ab9 100644 --- a/src/core/reference.js +++ b/src/core/reference.js @@ -415,7 +415,7 @@ * the initial state for the loop.The second expression is a condition that you * would like to check before each loop. If this expression returns false then * the loop will exit.The third expression is executed at the end of each loop. - * These expression are seperated by ; (semi-colon).In case of an empty expression, + * These expression are separated by ; (semi-colon).In case of an empty expression, * only a semi-colon is written. * * The code inside of the loop body (in between the curly braces) is executed between the evaluation of the second diff --git a/src/core/transform.js b/src/core/transform.js index 9e2683e67e..b6292b839f 100644 --- a/src/core/transform.js +++ b/src/core/transform.js @@ -183,7 +183,7 @@ p5.prototype.applyMatrix = function() { * * * @alt - * A rotated retangle in the center with another at the top left corner + * A rotated rectangle in the center with another at the top left corner */ p5.prototype.resetMatrix = function() { this._renderer.resetMatrix(); @@ -200,7 +200,7 @@ p5.prototype.resetMatrix = function() { * Transformations apply to everything that happens after and subsequent * calls to the function accumulates the effect. For example, calling * rotate(HALF_PI) and then rotate(HALF_PI) is the same as rotate(PI). - * All tranformations are reset when draw() begins again. + * All transformations are reset when draw() begins again. * * Technically, rotate() multiplies the current transformation matrix * by a rotation matrix. This function can be further controlled by @@ -235,7 +235,7 @@ p5.prototype.rotate = function(angle, axis) { * * Objects are always rotated around their relative position to the * origin and positive numbers rotate objects in a clockwise direction. - * All tranformations are reset when draw() begins again. + * All transformations are reset when draw() begins again. * * @method rotateX * @param {Number} angle the angle of rotation, specified in radians @@ -271,7 +271,7 @@ p5.prototype.rotateX = function(angle) { * * Objects are always rotated around their relative position to the * origin and positive numbers rotate objects in a clockwise direction. - * All tranformations are reset when draw() begins again. + * All transformations are reset when draw() begins again. * * @method rotateY * @param {Number} angle the angle of rotation, specified in radians @@ -309,7 +309,7 @@ p5.prototype.rotateY = function(angle) { * * Objects are always rotated around their relative position to the * origin and positive numbers rotate objects in a clockwise direction. - * All tranformations are reset when draw() begins again. + * All transformations are reset when draw() begins again. * * @method rotateZ * @param {Number} angle the angle of rotation, specified in radians