0.3.1 weight

This commit is contained in:
Rob Tillaart 2023-11-23 15:19:06 +01:00
parent d7b4a95212
commit bc3e61606a
5 changed files with 33 additions and 16 deletions

View File

@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/). and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.3.1] - 2023-11-23
- update readme.md
## [0.3.0] - 2023-08-29 ## [0.3.0] - 2023-08-29
- rename class **weightConvertor** to **weightConverter** - rename class **weightConvertor** to **weightConverter**
- add **adders** to the weightConverter to add different units of weight. - add **adders** to the weightConverter to add different units of weight.

View File

@ -21,6 +21,19 @@ Weight.h is a library containing weight conversion functions.
Open for additions, including obscure weight metrics or Open for additions, including obscure weight metrics or
weight related math functions and constants. weight related math functions and constants.
#### Overview of conversions:
```
stone - lbs - ounce
| | |
kilo kilo - gram
kilo - (stone, lbs, ounce)
```
#### Related #### Related
- https://github.com/RobTillaart/AtomicWeight - https://github.com/RobTillaart/AtomicWeight
@ -31,15 +44,8 @@ weight related math functions and constants.
## Interface ## Interface
Overview of conversions: ```cpp
#include "weight.h"
```
stone - lbs - ounce
| | |
kilo kilo - gram
kilo - (stone, lbs, ounce)
``` ```
Functions are straightforward. Functions are straightforward.
@ -85,6 +91,9 @@ Since version 0.3.0 the converter can also add different units.
## Interface ## Interface
```cpp
#include "weight.h"
```
#### Constructor #### Constructor
@ -153,9 +162,11 @@ Since version 0.3.0 the converter can also add different units.
- **float getGrain()** - **float getGrain()**
- **float getCarat()** - **float getCarat()**
## Future ## Future
#### Must #### Must
- improve documentation - improve documentation
- where are units used - where are units used
@ -163,10 +174,12 @@ Since version 0.3.0 the converter can also add different units.
#### Could #### Could
- create data types of stone lbs kilo etc.?
- create data types of stone lbs kilo etc.?
- should float be double?
#### Won't (unless) #### Won't (unless)
- large masses - sun planets ? (see relativity library) - large masses - sun planets ? (see relativity library)
- gravity constants of planets REL or ABS eg REL_GRAVITY_EARTH 1.0 - gravity constants of planets REL or ABS eg REL_GRAVITY_EARTH 1.0
- molarity functions - molarity functions

View File

@ -15,7 +15,7 @@
"type": "git", "type": "git",
"url": "https://github.com/RobTillaart/weight.git" "url": "https://github.com/RobTillaart/weight.git"
}, },
"version": "0.3.0", "version": "0.3.1",
"license": "MIT", "license": "MIT",
"frameworks": "*", "frameworks": "*",
"platforms": "*", "platforms": "*",

View File

@ -1,5 +1,5 @@
name=weight name=weight
version=0.3.0 version=0.3.1
author=Rob Tillaart <rob.tillaart@gmail.com> author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com> maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Library of weight conversion functions sentence=Library of weight conversion functions
@ -7,5 +7,5 @@ paragraph=Kilo gram stone lbs ounce pound
category=Signal Input/Output category=Signal Input/Output
url=https://github.com/RobTillaart/weight url=https://github.com/RobTillaart/weight
architectures=* architectures=*
includes=weight.h includes=weight.h
depends= depends=

View File

@ -2,7 +2,7 @@
// //
// FILE: weight.h // FILE: weight.h
// AUTHOR: Rob Tillaart // AUTHOR: Rob Tillaart
// VERSION: 0.3.0 // VERSION: 0.3.1
// PURPOSE: Collection weight conversion functions // PURPOSE: Collection weight conversion functions
// URL: https://github.com/RobTillaart/weight // URL: https://github.com/RobTillaart/weight
@ -10,7 +10,7 @@
#include "Arduino.h" #include "Arduino.h"
#define WEIGHT_LIB_VERSION (F("0.3.0")) #define WEIGHT_LIB_VERSION (F("0.3.1"))
///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////
@ -131,7 +131,7 @@ public:
float getCarat() { return _w * 5; }; float getCarat() { return _w * 5; };
private: private:
float _w; // grams float _w; // grams
}; };