Releases: chharvey/extrajs-types
Releases · chharvey/extrajs-types
Release list
v0.8.1
v0.8.0
Breaking
- the following classes depend on native
BigIntinstead of customInteger:-
MeterInt -
TreeNode -
Color -
Matrix
-
Features
- new testing suite using mocha
O&M
- update dependencies
v0.7.1
v0.7.0
Breaking
- remove deprecated
Integer#negate()(useInteger#negationinstead) - remove deprecated
{Angle,Length}#fromString()(usenew {Angle,Length}()instead) -
Intervalsubclass constructors used to take a single[number, number]argument. they now take two separatenumberarguments
New
-
TreeNode.class -
{Integer,Rational}#assertType - more semantically correct algorithm for comparing Rationals with
Rational#equals(the algo is a/b == c/d iff ad == cb) - replace use of
xjs.Object.switchwith nativeMap
Fix
- close #1 (relative luminance threshold)
- color constructor overloads are now more robust (BREAKING if they had been used incorrectly)
- update relative luminance calculations
- static methods
.maxand.minthrow when no arguments are given - export Duration.class
- improvements & optimizations
v0.6.0
Features
- new class
Rational.class - new getter
Integer#prevgetter returns.minus(1) - new getter
Integer#nextgetter returns.plus(1) - add
transparentcolor keyword (alias of#0000)
Changes
-
Integer#dividedBynow returns an accurate result when passed a non-integral number. -
Integer#expnow returns an accurate result when passed a non-integral number. -
Integer#tetrateis now DEPRECATED and could be removed in a future version
Fixes
- update docs
- add deprecation warnings:
-
Integer#negate()method: use getterInteger#negationinstead -
{Angle,Length}.fromString(): use constructors instead
-
v0.5.0
Features
New Classes
- new
Vector.class - new
Matrix.classandMatrixSquare.class - new
Meter.classandMeterInt.class - new
Interval.class - new
Duration.class
Changes
- constructors
new Length(),new Angle(),new Color()now accept string arguments - static methods
{Length,Angle}.fromString()are DEPRECATED -
Color.fromString()is not yet deprecated, but might be in the future, so start usingnew Color()
Fixes
- upgrade to
gulp^4 - upgrade to
typescript~3.3&typedoc^0.14 - upgrade to
extrajs^0.18
v0.4.0
Breaking
- replace
Percentage.classwithFraction.class, with a restriction: Fractions must be numbers between 0 and 1 (inclusive). Attempting to construct a Fraction less than 0 or greater than 1 will throw an error. -
Angleobjects now span a range of(-∞, ∞), which was previously[0, 1). this allows for the use of negative angles and angles more than 1 turn.
New
- all-new
Length.class - add new param
{Length,Angle}#constructor@unitfor constructing a length/angle measured in a given unit -
Angle#canon(getter) returns the smallest (least non-negative) congruent angle, that is, a congruent angle within the range[0, 1) -
Angle#congruentreturns a boolean: whether two angles are congruent (separated by an integer number of turns)
Changed
- param
{Length,Angle}#toString@unitnow has a default value -
Percentage.stringifyis DEPRECATED in favor of the nativeIntl.NumberFormat
v0.3.0
Features
New
- new
Colormodule withColorSpaceenum (ported from deprecated extrajs-color package - new
Percentagemethods:- static
.max - static
.min - static
.fromString - instance getter
.conjugate - instance
.clamp
- static
- add test suite
- add static method
Angle.fromString
Updated
- export
AngleUnitenum along withAnglemodule (renamed fromUnit) - method
Angle#clampnow has default params and can take number arguments - method
Integer#clampcan now take number arguments
Fixes
- fix default param
Percentage#toString@radixto 10 - upgrade to extrajs@0.16.0
- update dependencies for security patches
v0.2.0
Breaking
- IMPORTANT: this repository is renamed to extrajs-types in an effort to become more inclusive. more classes will be added in the future, which may not specifically be types of "numbers". it is published on npm at https://www.npmjs.com/package/extrajs-types
Features
- new methods:
-
Angle{.{max,min},#clamp} -
Integer{.{max,min},#{abs,clamp,tetrate}} - inverse trig functions:
Angle.{asin,acos,atan,acsc,asec,acot}
-
- new top-level function:
assertType(moved from extrajs)