Comments (5)
This make sense, to have core library and adapters to provide light and accurate but more computation heavy implementation. It's how angular material solves usage of different date libraries in their date picker. Those are just my thoughts after reading source code, after listening podcast about dotnet original library.
from unitsnet-js.
@k3nsei version 2.1.1 contains #34 to allow external arithmetic formulas has been released.
Thank you for your valuable input.
from unitsnet-js.
Hi @k3nsei
While working in JS, I think this is the "expected" result, since this is a JS operation matter.
What do you suggest? Are you familiar with a particular library that does this operation correctly?
from unitsnet-js.
@haimkastner I firmly believe that when working with measurements, accuracy is a top priority.
Below is a link to an article on the subject and some libraries that could be used.
https://smartbear.com/blog/four-serious-math-libraries-for-javascript/
from unitsnet-js.
@k3nsei, I understand your perspective, but I think adding such a dependency might be too much for most situations. While this library is currently pure JS without any dependencies, adding such one would end up making it heavier than necessary.
However, as you mentioned, it is important to allow maximum accuracy. Therefore, I am contemplating a solution where the library will expose an API for replacing the arithmetic functions with external ones. This way, users of the library would have the flexibility to select their preferred arithmetic function while still retaining JavaScript as the default option, with clear documentation provided about it.
from unitsnet-js.
Related Issues (20)
- Implement lazy load for each unit property HOT 1
- Generate all prefixes units HOT 1
- Why ist "Millimeter" Missing in all Units? HOT 1
- Fetch the units definition from the UnitsNet repo HOT 1
- make unit abbreviations used in .toString() accessible HOT 1
- Missing Unit Abbreviations HOT 4
- Full support for units.net features? HOT 2
- Length.multiply() multiplicator HOT 1
- Equally use singular for unit types as in the c# project HOT 10
- Generate 'toString' method for each unit HOT 1
- Support Cross-Technologies Unit & API Specifications HOT 5
- Allow truncate fraction digits on 'toString' HOT 1
- CORS Error in OpenAPI Spec Example HOT 1
- Check ctor parameter validity HOT 1
- Expose the base value to allows high-performance access to base-value for quick calculation etc. HOT 1
- Add JSDoc from the definition XMLDoc HOT 1
- Generate 'compareTo' and 'equals' for each unit HOT 1
- Generate basic arithmetics methods for each unit HOT 1
- fix 'toString' format of prefixes units HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unitsnet-js.