All notable changes of every update of the Chalkboard library are recorded in this file.
v2.1.0 Seki - 01/22/2024
The eleventh release of the Chalkboard library.
Commits: v2.0.0...v2.1.0
- Added a total of 26
.isFoo
commands in thematr
,tens
, andvect
categories that check if a matrix, tensor, or vector fulfills a particular property (for example,matr.isDiagonal
checks if a matrix is a diagonal matrix) - Added
matr.norm
,matr.normsq
, andmatr.normalize
to calculate the norm of a matrix or normalize a matrix - Added
matr.eigenvalue
andmatr.eigenvector
to calculate the dominant eigenvalue and eigenvector of a matrix - Added
matr.diagonal
,matr.lowerTriangular
, andmatr.upperTriangular
to initialize a diagonal or triangular matrix - Added
matr.lowerBinomial
,matr.symmetricBinomial
,matr.upperBinomial
,matr.lowerShift
, andmatr.upperShift
to replace the removedmatr.binomial
andmatr.shift
commands - Added
matr.perm
to calculate the permanent of a matrix - Added
comp.toMatrix
andquat.toMatrix
to convert a complex number or a quaternion to a matrix - Added
comp.argBetween
to calculate the argument between two complex numbers - Added
numb.isApproxEqual
to check if two numbers are approximately equal - Added
numb.mod
to calculate the mathematically-correct modulo (instead of the symmetric modulo which is what the%
operator does) - Added
numb.roundTo
to round a number to the nearest inputted positional index (or place value) - Removed
matr.binomial
andmatr.shift
- Changed nearly all of the
matr
commands to work significantly faster for 2x2, 3x3, and 4x4 matrices (for example, multiplications are about 67% faster, inversions are about 85% faster, and determinants are about 95% faster) when compared with previous versions of Chalkboard - Changed
matr.adjugate
,matr.cofactor
,matr.push
,matr.pull
, andmatr.toVector
to use a zero-based index instead of a one-based index - Changed
matr.concat
,matr.push
,matr.pull
,matr.toVector
, andvect.toMatrix
to use anaxis
parameter instead of atype
parameter - Changed
matr.push
,matr.pull
, andmatr.toVector
to have theirrowORcol
parameter be renamed asindex
- Changed
calc.fds
andcalc.fnds
to work with the changes inmatr.toVector
- Changed
matr.reduce
to be renamed asmatr.Gaussian
- Changed nearly all of the
vect
commands to use the newvect.isDimensionOf
command instead of a ridiculous amount oftypeof
operators - Changed
tens.rank
to use the length oftens.size
instead of doing its own calculation - Changed
tens.empty
,tens.fill
,tens.random
, andtens.resize
to use a ternary operator instead of anif
statement to check whether a sequence of arguments or an array is inputted into theirsize
parameters - Changed
numb.Bernoullian
to not have an unnecessaryif
statement for its optional parameter
v2.0.0 al-Khwarizmi - 01/08/2024
The tenth release of the Chalkboard library.
Commits: v1.7.0...v2.0.0
- Rewrote everything in TypeScript, applied ESLint and Prettier, and remade the website with TypeDoc
- Added
APPLY
which applies a callback function in an element-wise manner on a complex number, matrix, quaternion, tensor, or vector - Added the
vect
category which merges thevec2
,vec3
, andvec4
categories into one - Added
VERSION
andVERSIONALIAS
which return the installed version and its alias, respectively - Removed the
vec2
,vec3
, andvec4
categories - Removed
quat.fromVector
because it's been replaced byvect.toQuaternion
- Removed
plot.vec3
because it was weird - Changed everything due to the TypeScript rewrite and the vector categories merge
- Changed all of the
.new
commands to be renamed as.init
- Changed
real.function
to be renamed asreal.define
,comp.function
to be renamed ascomp.define
, andplot.function
to be renamed asplot.definition
- Changed
LOGO
to draw the logo as a circle instead of a square - Changed
matr.mulvec
to be renamed asmatr.mulVector
- Fixed `matr.mulVector`` which didn't work when the rows of the matrix equaled the dimension of the vector
- Discontinued the Processsing.js edition of the library, meaning it will no longer be updated and it will only be available on the Khan Academy release (it will no longer be available on GitHub)
v1.7.0 Descartes - 01/01/2024
The ninth release of the Chalkboard library.
Commits: v1.6.0...v1.7.0
- Added tensors (multidimensional multidimensional matrices, or n-dimensional arrays) with 29 commands in the new
tens
category - Added 12 more matrix commands: copying, resizing, five new primitive matrices (exchange, shift, binomial, Hilbert, Lehmer), concatenating, multiplying with vectors, Kronecker sum, Kronecker product, and converting to a tensor
- Added
.copy
commands for complex numbers, quaternions, and vectors - Added
stat.toTensor
to convert an array to a tensor - Added quaternion division with
quat.div
- Added
PARSEPREFIX
as a Chalkboard global which makes it easier to add custom functions to Chalkboard functions than theinit
parameter inreal.parse
andcomp.parse
- Added
CONTEXT
as a Chalkboard global to replace the removedplot.CONTEXT
- Removed
plot.CONTEXT
- Changed all of the
plot
commands,LOGO
, andgeom.line3D
to use the newCONTEXT
constant instead ofplot.CONTEXT
- Changed all of the
plot
commands to useconfig.x
andconfig.y
to determine their position on the canvas instead ofconfig.origin
- Changed all of the
plot
commands' initialization of theconfig
parameter to be two less lines long - Changed
matr.plot
to have aconfig.domain
option - Changed
real.parse
andcomp.parse
to no longer have aninit
parameter - Changed many of the
comp
andquat
commands to accept regular numbers (not just complex numbers and quaternions) as inputs - Changed
comp.new
andquat.new
to be able to accept only one argument as the real part and fill the imaginary part(s) with zeroes - Changed
stat.eq
,stat.ineq
,stat.lt
, andstat.gt
to useArray.isArray
instead of.constructor === Array
- Changed
stat.toVector
to have anindex
parameter to change the index of the array to start at when defining a vector - Changed all of the integration commands (
calc.fxdx
,calc.fxydxdy
,calc.fds
,calc.frds
,calc.fnds
, andcalc.fzdz
) to useinf
andsup
for the bounds in their parameters instead ofa
,b
,c
, andd
- Changed
matr.new
to accept one array of arrays (already-constructed matrix) as an input instead of only multiple arrays (to use as rows to construct a matrix) - Changed the order of
matr.random
's parameters - Changed
matr.fill
,matr.empty
, andmatr.random
to make square matrices with the size inputted into therows
parameter if nothing is inputted into thecols
parameter - Changed
matr.LUdecomp
andmatr.QRdecomp
to usematr.fill
instead ofmatr.zero
composed withmatr.empty
- Fixed
plot.matr
which hadn't been working for who knows how long because of a critical misspelling (vec2.plot
instead ofplot.vec2
) - Fixed (rewrote)
numb.binomial
which kept giving "callstack size exceeded" errors for some reason - Fixed (rewrote)
matr.QRdecomp
thanks to @JentGent's implementation
v1.6.0 Fermat - 12/25/2023
The eighth release of the Chalkboard library.
Commits: v1.5.0...v1.6.0
- Added a new type of function: the inverse function (
type
of"inve"
) - Added
stat.regression
to calculate different types of statistical regression models (linear, polynomial, exponential, etc.) - Added
plot.CONTEXT
which determines theCanvasRenderingContext2D
to use for plots - Added LU decomposition and QR decomposition for matrices with
matr.LUdecomp
andmatr.QRdecomp
- Added
matr.push
andmatr.pull
to add or remove rows or columns from matrices - Added
matr.fill
to create a new matrix with a single value for all of the elements - Added more commands for generating random numbers:
numb.exponential
,numb.Bernoullian
, andnumb.Poissonian
- Added
numb.Goldbach
to return an even number as a sum of two prime numbers - Added
numb.Euler
to calculate Euler's totient function on a number - Added
stat.shuffle
to randomly shuffle an array andstat.subsets
to return all of the possible subsets of an array - Changed all of the
plot
commands to use an optionalconfig
object parameter to configure their customizations (size, color, domain, etc.) instead of separate parameters for each of them - Changed
real.function
,real.val
,calc.dfdx
,calc.d2fdx2
, andcalc.fxdx
to accomodate the new"inve"
function type - Changed all of the
plot
commands, theLOGO
command, and thegeom.line3D
command to use the newplot.CONTEXT
value instead ofctx
andcanvas
- Changed
matr.empty
andmatr.random
to userows
andcols
as parameters for the size of the matrix instead ofdimension
, and renamed thedimension
parameter formatr.identity
tosize
- Changed
real.nrt
to be renamed asreal.root
(sostat.mean
had to be changed since it was used there), and changed then
parameter incomp.root
to be renamed asindex
- Changed
numb.random
to use its default values only if the parameters are undefined instead of if the parameters are falsy - Changed
matr.new
to use itsmatrix
parameter instead of leaving it as declared but unused - Changed
comp.d2fdz2
which was incorrectly named ascomp.df2dz2
- Fixed (rewrote)
numb.Gaussian
which basically didn't work at all - Fixed
real.pow
which returnedNaN
for 0 raised to the power of 0 - Fixed the default domain for
plot.function
which was incorrectly using the domain for domain colorings instead of normal graphs
v1.5.0 Cauchy - 12/18/2023
The seventh release of the Chalkboard library.
Commits: v1.4.0...v1.5.0
- Added Chalkboard as an npm package, so now it can be used on the server-side just like the client side
- Added
comp.function
,comp.parse
, andcomp.val
to define, parse, and evaluate complex functions - Added
calc.dfdz
,calc.d2fdz2
, andcalc.fzdz
to calculate the first derivatives, second derivatives, and antiderivatives of complex functions - Added approximations of functions using Taylor series with
calc.Taylor
andplot.Taylor
- Added
comp.pow
to calculate the exponentiation of a complex number - Added
comp.root
to calculate the roots of a complex number - Added
comp.invert
(calculates the multiplicative inverse of a complex number) to replace the functionality ofcomp.reciprocate
- Removed
stat.gte
andstat.lte
and respectively incorporated their functionalities intostat.gt
andstat.lt
- Changed
comp.reciprocate
to return the reciprocals of the components of a complex number instead of returning the multiplicative inverse of a complex number - Changed
stat.gt
andstat.lt
to haveincludeEnd
parameters which determines whether the conditional they check for is "greater/less than" (input false) or "greater/less than or equal to" (input true) - Changed
plot.barplot
andplot.lineplot
to use the new functionalities ofstat.gt
andstat.lt
instead of the removedstat.gte
andstat.lte
- Changed
comp.Re
andcomp.Im
to respectively return the real and imaginary components of complex functions, too, instead of only the real and imaginary components of complex numbers - Changed
stat.toObject
to return an object with its properties named based on the array's index instead of the array's element - Changed
trig.arctan2
to useMath.atan
instead oftrig.arctan
to be faster - Changed the name of
calc.frdt
tocalc.frds
- Changed
plot.function
to accept complex functions as inputs to plot their domain colorings - Fixed the error messages in
calc.dfdrt
which were misspelled - Fixed
plot.field
to include the upper bounds in its domain
v1.4.0 Herschel - 12/11/2023
The sixth release of the Chalkboard library.
Commits: v1.3.1...v1.4.0
- Added many new commands for arrays: creating an array of random numbers, calculating different types of the norm (and the squared norm) of an array, calculating the normalized array, calculating the array that has the numbers that are equal to, greater than (or equal to), less than (or equal to), or some compound inequality of another number or array, calculating the skewness and kurtosis of an array, calculating the different quartiles of an array, and converting an array to a vector, matrix, object, string, or printing it in the console
- Added
plot.barplot
,plot.lineplot
, andplot.scatterplot
to plot arrays of data - Added
.constrain
commands for numbers, arrays, complex numbers, quaternions, vectors, and matrices to constrain their values within a range - Added
trig.arctan2
to accurately calculate the angle between a vector and the positive x-axis - Added
numb.sum
andnumb.mul
for the calculation of specified summation and product formulae - Added
.reflect
and.refract
commands for vectors to calculate reflection and refraction vectors - Added
real.pingpong
to calculate the ping-pong function - Added
geom.mid
to calculate the midpoint between two multidimensional points - Changed all of the
plot
commands to return an array of data containing all of the ordered pairs of plotted points instead of returning a string with details on what was plotted and how - Changed
real.parse
to have an optional command to input initializing code before the return function - Changed
vec2.ang
,comp.arg
, andcomp.ln
to usetrig.arctan2
instead oftrig.arctan
- Changed
real.Heaviside
,real.Dirac
,real.ramp
, andreal.rect
to have parameters for theedge
(the starting point) and thescl
(scalar multiplication) of their respective functions - Changed
comp.new
andquat.new
to have atype
property (like the.new
commands for vectors) that's always set to"comp"
and"quat"
, respectively - Changed
geom.dist
andgeom.distsq
to be written with loops instead of array methods - Changed
calc.frdt
to also work for three-dimensional (instead of only two-dimensional) vector fields and parametric curves - Fixed
calc.dfrdt
which didn't work due to a slight misspelling in anif()
statement
v1.3.1 Heaviside Patch - 12/04/2023
The fifth release of the Chalkboard library.
Commits: v1.3.0...v1.3.1
- Fixed
matr.translator
which was misspelled - Fixed
matr.rotator
which didn't work for two-dimensional rotations and was also misspelled - Fixed
calc.grad
which didn't work for vector fields because of another misspelling
v1.3.0 Heaviside - 12/04/2023
The fourth release of the Chalkboard library.
Commits: v1.2.0...v1.3.0
- Added multivariable calculus, with commands for directional differentiation, multivariable chain rule, gradient (partial differentiation), double gradient (second-order partial differentiation), divergence, curl, double integration, line/surface integration, arc length, surface area, and curvature
- Added second-order differentiation with
calc.d2fdx2
, unit tangent vectors for parametric curves withcalc.tangent
, unit normal vectors withcalc.normal
, and unit binormal vectors withcalc.binormal
- Functions that previously had the
type
property of"para"
should now be changed to"curv"
- Added
.field
and.fromField
commmands for vectors which define vector fields and evaluate them at particular vectors, respectively - Added
plot.field
andplot.d2fdx2
to plot vector fields and second-order derivatives, respectively - Added
.proj
and.oproj
commands for vectors which calculate the vector projections and rejections, respectively - Added commands for vectors to convert between coordinate systems (
vec2.fromPolar
,vec3.toSpherical
, etc) - Changed
matr.toVector
to have another optional parameter for the row/column of a matrix to define a vector from - Added
comp.scl
andquat.scl
, and changed all of the.magset
commands to work using their respective.scl
commands - Added a
type
parameter tostat.mean
to enable the calculation of different types of means: arithmetic, geometric, and harmonic - Removed
geom.dist2D
andgeom.dist3D
and replaced them withgeom.dist
andgeom.distsq
which can calculate the distance between any-dimensional points - Removed
vec2.rotate2D
,vec3.rotatex
,vec3.rotatey
, andvec3.rotatez
because all vector rotations can be handled with rotation matrices - Removed
matr.rotater2D
andmatr.rotater3D
and replaced them withmatr.rotater
which can do both 2D and 3D rotations depending on the number of parameters inputted (one parameter required for 2D rotations, three parameters required for 3D rotations) - Removed
real.sqrt
from returning a complex number when the input is negative because it would sometimes cause bugs - Changed
real.function
,real.parse
,calc.dfdx
, andcalc.fxdx
to work for the new"mult"
function type for multivariable functions, the new"curv"
function type for parametric curves, and the new"surf"
function type for parametric surfaces - Changed all
plot
commands so they can now optionally have their opacity changed with thergba
parameter (which previously used to only bergb
) - Changed
numb.Gaussian
to usefor(;;)
instead ofwhile(typeof x === "undefined")
- Changed the name of
calc.average
tocalc.mean
- Fixed
matr.invert
returningNaN
values when0
is on the diagonal of a matrix, thanks to @bhavjitChauhan.
v1.2.0 Cayley - 11/27/2023
The third release of the Chalkboard library.
Commits: v1.1.0...v1.2.0
- Added new matrix commands for the trace of a matrix, the row space of a matrix, the column space, and null space, the exponentation, the row Echelon form (Gaussian elimination), solving systems of linear equations, and conversion of a matrix to an object
- Added
plot.comp
,plot.vec2
,plot.vec3
, andplot.matr
to replacecomp.display
,vec2.display
,vec3.display
, andmatr.display
- Added
numb.binomial
to calculate binomial coefficients - Removed
vec2.fromNumber
,vec3.angcos
,vec4.angcos
, andmatr.dimension
- Removed all of the
.addScl
(scalar addition) commands for vectors - Changed all of the
matr
commands to work for matrices of any and all dimensions (previously there was a four-by-four dimension limit) - Changed all of the
.mulScl
(scalar multiplication) commands for vectors and matrices to be renamed as.scl
- Changed
numb.random
to have both of its parameters be optional (no parameters inputted returns a random number between 0 and 1) - Changed
numb.Gaussian
to usewhile(typeof x === "undefined")
instead ofwhile(true)
- Fixed the
vec2.magset
andvec3.magset
commands which would return vectors in the wrong dimensions
v1.1.0 Riemann - 11/13/2023
The second release of the Chalkboard library.
Commits: v1.0.0...v1.1.0
- Added
numb.prime
to calculate the nth prime number,numb.nextPrime
to calculate the next prime number, andnumb.primeGap
to calculate the prime gap with an interval - Added
numb.factors
to calculate the prime factorization of a number andnumb.divisors
to calculate the divisors of a number - Added
numb.Gaussian
to calculate a random number based on a Gaussian distribution - Added
.convolution
,.correlation
, and.autocorrelation
commands in thestat
,calc
, andplot
categories to calculate and plot the discrete and continuous convolutions, cross-correlations, and autocorrelations of arrays and functions, respectively - Added
stat.error
to calculate the standard error of an array - Added
matr.cofactor
andmatr.adjugate
to calculate the cofactor and adjugate matrices of a matrix - Removed
calc.rOdO
because polar differentation can now be done withcalc.fxdx
instead - Changed
calc.fxdx
to work using Simpson's rule instead of the trapezoidal Riemann sum - Changed
real.val
,calc.dfdx
, andcalc.fxdx
to work for all Chalkboard functions regardless of theirtype
(before they only worked for"expl"
functions) - Changed
matr.det
andmatr.transpose
to work for all matrices regardless of their dimension - Changed
numb.Fibonacci
to have a cache so it works faster - Changed the order of the lower and upper values in the
stat.confidenceInterval
return array - Changed
plot.function
andnumb.factorial
to be more written slightly more efficiently - Changed the name of the
position
parameter instat.Gaussian
tomean
- Changed the name of
numb.prime
(the command that checks if a number is prime) tonumb.isPrime
, so parts ofnumb.primeArr
andprime.compositeArr
had to be changed, too
v1.0.0 Euclid - 11/06/2023
The first release of the Chalkboard library.
Commits: v1.0.0...main