Skip to content

Releases: chharvey/extrajs-types

v0.8.1

Choose a tag to compare

@chharvey chharvey released this 15 May 03:44
  • security & deps updates

v0.8.0

Choose a tag to compare

@chharvey chharvey released this 05 Feb 07:06

Breaking

  • the following classes depend on native BigInt instead of custom Integer:
    • MeterInt
    • TreeNode
    • Color
    • Matrix

Features

  • new testing suite using mocha

O&M

  • update dependencies

v0.7.1

Choose a tag to compare

@chharvey chharvey released this 04 Sep 20:10
  • security updates

v0.7.0

Choose a tag to compare

@chharvey chharvey released this 16 Jul 02:11

Breaking

  • remove deprecated Integer#negate() (use Integer#negation instead)
  • remove deprecated {Angle,Length}#fromString() (use new {Angle,Length}() instead)
  • Interval subclass constructors used to take a single [number, number] argument. they now take two separate number arguments

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.switch with native Map

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 .max and .min throw when no arguments are given
  • export Duration.class
  • improvements & optimizations

v0.6.0

Choose a tag to compare

@chharvey chharvey released this 11 Mar 01:43

Features

  • new class Rational.class
  • new getter Integer#prev getter returns .minus(1)
  • new getter Integer#next getter returns .plus(1)
  • add transparent color keyword (alias of #0000)

Changes

  • Integer#dividedBy now returns an accurate result when passed a non-integral number.
  • Integer#exp now returns an accurate result when passed a non-integral number.
  • Integer#tetrate is now DEPRECATED and could be removed in a future version

Fixes

  • update docs
  • add deprecation warnings:
    • Integer#negate() method: use getter Integer#negation instead
    • {Angle,Length}.fromString(): use constructors instead

v0.5.0

Choose a tag to compare

@chharvey chharvey released this 27 Feb 16:17

Features

New Classes

  • new Vector.class
  • new Matrix.class and MatrixSquare.class
  • new Meter.class and MeterInt.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 using new Color()

Fixes

  • upgrade to gulp^4
  • upgrade to typescript~3.3 & typedoc^0.14
  • upgrade to extrajs^0.18

v0.4.0

Choose a tag to compare

@chharvey chharvey released this 23 Dec 04:30

Breaking

  • replace Percentage.class with Fraction.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.
  • Angle objects 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@unit for 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#congruent returns a boolean: whether two angles are congruent (separated by an integer number of turns)

Changed

  • param {Length,Angle}#toString@unit now has a default value
  • Percentage.stringify is DEPRECATED in favor of the native Intl.NumberFormat

v0.3.0

Choose a tag to compare

@chharvey chharvey released this 28 Nov 16:39

Features

New

  • new Color module with ColorSpace enum (ported from deprecated extrajs-color package
  • new Percentage methods:
    • static .max
    • static .min
    • static .fromString
    • instance getter .conjugate
    • instance .clamp
  • add test suite
  • add static method Angle.fromString

Updated

  • export AngleUnit enum along with Angle module (renamed from Unit)
  • method Angle#clamp now has default params and can take number arguments
  • method Integer#clamp can now take number arguments

Fixes

  • fix default param Percentage#toString@radix to 10
  • upgrade to extrajs@0.16.0
  • update dependencies for security patches

v0.2.0

Choose a tag to compare

@chharvey chharvey released this 02 Nov 22:30

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)

v0.1.0

Choose a tag to compare

@chharvey chharvey released this 18 Oct 19:55

Features

  • Integer.class.ts
  • Percentage.class.ts
  • Angle.class.ts