All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Aliases for some function:
frac: { fraction: frac, quotRem: qr }
.core: { distance: dist, random: rnd, randonInt: rndi, }
.
- Remove exposing of API in the global API
rakam.math2js // not defined
, butcore
still exposed. - Rename
rakam.fraction
intorakam.frac
.
-
Change
src
for the demo's<script></script>
: issue(#2). -
Change
license
insidepackage.json
to "Apache-2.0": issue(#3). -
Replace
prepare
script inpackage.json
withprepublishOnly
: issue(#4).
- Import (es6 import) or require (commonjs) specific method to accelerate app loading, and to minimize your bundle size.
geometry.lines
:equation
intersection
projection
distance
- Add a header to the bundled file.
fraction
:frac
quotRem
- Rename
parser
toengine
, for semantic purpose, and it is a more existing name.
- Use the package angles.js, extending some new APIs, (methods), here below.
fromDeg
,fromRad
andfromGon
- In
geometry.angles.degMinSec
, you can get {deg, min, sec}. Convert float number into degrees, minutes, and seconds. geometry.angles.strDegMinSec
, you can get an angle formatted as (12° 3' 5"). Convert float number or {deg, min, sec} into a string representing the angle in degrees, minutes, and seconds.geometry.angles.fromDegMinSec
, reverts the functiondegMinSec
.geometry.angles.fromStrDegMinSec
, reverts the functionstrDegMinSec
.- Alias some long-name function: replace degMinSec with
DMS
. For example,fromStrDegMinSec
=fromStrDMS
anddigMinSec
=DMS
. geometry.angles.nomalizeInside
, gets the equivalent engle inside a complete round starting from a given offset. For example, you can accomplish the same result withangles.normalizeHalf(angle)
andangles.normalizeInside(angles, -0.5)
, -0.5 here is the offset (-50%) of our range which the angle will be normalized in.
- The second trial to fix the README file issue, after asking a question in "stackoverflow".
- Change README.md from a binary looking file into a file in bytes, there was weird README in rakam.
-
math2js
to convert math expression from a string into real js function by generating the code then evaluating it. -
geometry.angles
property in the exported library, with angles you can get:- the angle between two vectors or lines, in a clockwise direction or the other one. You can also trim or normalize the angle to be between 0 and 360.
- the min angle between two vectors or lines, in either direction
- as well as the max angle
-
geometry.lines
, here you can get:- line equation
ax+by+c=0
, the line info returned as{a:number, b:number, c:number}
- the intersection point between two lines
- projection of a point on a line
- the dist, or the displacement till the line from a given point, the shortest distance to the line, which is the length of the perpendicular line to this line from that point.
- line equation
-
core
: that contains some useful functions such aslcm
,gcd
,constrain
,dist