infusion
Repos
36
Followers
629
Following
1

Fraction is a rational numbers library written in JavaScript

405
54

An arbitrary size Bit-Vector implementation in JavaScript

207
29

A DHCP server and client written in pure JavaScript

274
64

A NMEA parser and GPS utility library

226
57

A complex numbers library

212
29

A MySQL functionality enhancement UDF

129
30

Events

Delete bower.json

Created at 4 days ago

Update README.md

Created at 6 days ago

Update README.md

Created at 1 week ago

Update README.md

Created at 1 week ago

Update README.md

Created at 1 week ago
issue comment
new Fraction(value) fails when not using en-US decimal format

I like this idea, but since Fraction.js should be fairly small when packaged and only a small portion of input strings would be covered, namely numbers with fractional part, this is either a good idea of an own library that translates the locales, or by fixing it before passing it to Fraction.js.

Here in Germany, we probably have the format as you, "123,45" and "123.456,99" with 1000s separators. Fixing this is usually just removing the dots and replacing the , by .. When you need it more flexible based on the locale, you could use something around the new Intl object, as outlined here https://observablehq.com/@mbostock/localized-number-parsing

But as I said, this only covers numbers like "123,45", fractions can also be "123/456" or "44 123/456". So maybe checking if no [ /:] exists in the string could lead to the NumberParser approach stated on the referenced site.

Created at 1 week ago

Improved abs expression for bigfraction

Created at 2 weeks ago

Improved abs expression

Created at 2 weeks ago
closed issue
Question about `log`s & `pow`s in base 10

Why when a Number is converted to a Fraction the library internally uses powers and logarithms in base 10? Shouldn't that potentially reduce floating-point precision? Why not base 2?

Created at 1 month ago
issue comment
Question about `log`s & `pow`s in base 10

I'll close the ticket for now, feel free to bring up other optimizations on Fraction.js :)

Created at 1 month ago
issue comment
Feature: Add function to get the principal value of angles

The question is, if this is something p5.js should do, or rather another library such as Angles.js with its method normalizeHalf(x): https://www.npmjs.com/package/angles

Created at 1 month ago
closed issue
Bad link in README

This link in the README.md is bad. When used, you're presented with a 500 server error as seen below.

Screen Shot 2022-12-08 at 11 08 04 AM

Created at 1 month ago
issue comment
Bad link in README

Thanks, it seems they dropped jsperf. I removed the link from the readme, thanks!

Created at 1 month ago

Update README.md

Created at 1 month ago
issue comment
Slide in closest direction when in loop mode

Any progress on this? Having the same problem on a new project now

Created at 1 month ago
issue comment
GDOP and Hv

According to the equations I posted your calculation is wrong. GDOP can therefore be calculated with

GDOP = sqrt(PDOP^2 + TDOP^2)

or

GDPÜ = sqrt(HDOP^2 + VDOP^2 + TDOP^2)

as I already said. Maybe it can be defined like that but what you calculate I don't know.

Created at 2 months ago
issue comment
GDOP and Hv

Maybe this paper is of help to achieve your goal https://stc.fs.cvut.cz/history/2011/sbornik/papers/pdf/1100016-1.pdf

Created at 2 months ago
issue comment
GDOP and Hv

I think it depends on what you or your employer is trying to achieve. The definition of GDOP according to [1] is

From that follows that you could calculate the GDOP based on the PDOP or HDOP and VDOP as well as TDOP if you have it. However, I don't know a receiver that gives you that information. Which brings me back to the question: What are you trying to achive?

[1] Kalman Filtering Theory and Practice with MATLAB by Mohinder S. Grewal, Angus P. Andrews

Created at 2 months ago

Improvements on PCA9685 lib

Created at 2 months ago
issue comment
Unexpected Results

Hi, Java and C# compatibility on that wasn't a design goal, but thanks for bringing this up! Could you please provide the full output of what you feed in and what you expect to come out? Thanks!

Created at 2 months ago