From dfffa5f851d0e4826603ef5ee816768cedc841a9 Mon Sep 17 00:00:00 2001 From: Dennis Date: Fri, 18 Aug 2023 18:26:12 +0200 Subject: [PATCH] Fix typos (#39) Co-authored-by: Dennis Geldhof --- .github/ISSUE_TEMPLATE/new_unit_request.md | 2 +- CHANGELOG.md | 2 +- README.md | 6 +++--- example/example3.dart | 2 +- example/main.dart | 8 ++++---- lib/models/double_property.dart | 2 +- lib/models/ratio_property.dart | 2 +- lib/utils/utils.dart | 2 +- test/conversion_test.dart | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/new_unit_request.md b/.github/ISSUE_TEMPLATE/new_unit_request.md index 575fe4e..779379f 100644 --- a/.github/ISSUE_TEMPLATE/new_unit_request.md +++ b/.github/ISSUE_TEMPLATE/new_unit_request.md @@ -8,7 +8,7 @@ assignees: '' --- **Description** -Add here a brief explanation to which units should be added and possibily why (e.g. they are often used in a specific job). We know that there are a ton of unit of measurement that are not yet added to this app. We want to have just the most used one. +Add here a brief explanation to which units should be added and possibly why (e.g. they are often used in a specific job). We know that there are a ton of unit of measurement that are not yet added to this app. We want to have just the most used one. **Units to be added** | Unit name | Property | Reference to the conversion formula | diff --git a/CHANGELOG.md b/CHANGELOG.md index 11c4a9a..5411391 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,7 @@ documentation for more details. Now you can easily convert in this way: # 1.2.0 Improved the formatting of the string representation of the number -(`stringValue`): now it is also possibile to choose between decimal or +(`stringValue`): now it is also possible to choose between decimal or scientific notation. Added feet (US survey), feet squared (US survey) and kilocalories. diff --git a/README.md b/README.md index 7635098..5742406 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This package is used by [Converter NOW](https://github.com/ferraridamiano/ConverterNOW)! -The documentation is structured in examples of incresing complexity. But don't worry, in most cases you will only need the first examples. +The documentation is structured in examples of increasing complexity. But don't worry, in most cases you will only need the first examples. ## Table of Contents - [Convert a unit to another unit (the easy way)](#convert-a-unit-to-another-unit-the-easy-way) @@ -153,7 +153,7 @@ Output: ## Custom conversion -*In most cases, you will only need `SimpleCustomProperty` (see the previous section). `SimpleCustomProperty` allow you to define conversions in the form of `y=ax`. But if you need to define special relationship between units you need `CustomProperty`. This allow you to perform conversion like: `y=ax+b` and `y=a/x+b` (where `y` and x are the value of two units and `a` and `b` are two coefficient), for example the conversion between Celsius and Fahreneit use the first relation and the conversion between km/l and l/100km has to be done with the second relation. Both can't be done with `SimpleCustomProperty`.* +*In most cases, you will only need `SimpleCustomProperty` (see the previous section). `SimpleCustomProperty` allow you to define conversions in the form of `y=ax`. But if you need to define special relationship between units you need `CustomProperty`. This allow you to perform conversion like: `y=ax+b` and `y=a/x+b` (where `y` and x are the value of two units and `a` and `b` are two coefficient), for example the conversion between Celsius and Fahrenheit use the first relation and the conversion between km/l and l/100km has to be done with the second relation. Both can't be done with `SimpleCustomProperty`.* **Example 6**: let's define the following imaginary units of measurement: @@ -228,7 +228,7 @@ name:OneOver(DashPlus1), value:0.5, stringValue:0.5, symbol:null - Speed (miles per hour, kilometers per hour, etc.) -- Temperature (celsius, fahreneit, etc.) +- Temperature (celsius, fahrenheit, etc.) - Time (seconds, years, etc.) diff --git a/example/example3.dart b/example/example3.dart index 99cc36f..2d70285 100644 --- a/example/example3.dart +++ b/example/example3.dart @@ -6,7 +6,7 @@ void main() { Angle(significantFigures: 7, removeTrailingZeros: false); // conversion angle.convert(ANGLE.degree, 1); // We get all the units - var units = angle.getAll(); //We get all ther others units + var units = angle.getAll(); //We get all the others units // Let's print all of them for (var unit in units) { print( diff --git a/example/main.dart b/example/main.dart index 0bf8058..7d1746d 100644 --- a/example/main.dart +++ b/example/main.dart @@ -11,19 +11,19 @@ void main() { //example 2: convert 1 meter in inches var length = Length()..convert(LENGTH.meters, 1); //We give 1 meter as input - var unit = length.inches; //We get all ther others units + var unit = length.inches; //We get all the others units print( 'name:${unit.name}, value:${unit.value}, stringValue:${unit.stringValue}, symbol:${unit.symbol}'); //---------------------------------------------------------------------------- - //example 3: convert 1 degree in all ther other angle units + //example 3: convert 1 degree in all the other angle units var angle = Angle( significantFigures: 7, removeTrailingZeros: false); //this time let's also keep 7 significant figures angle.convert(ANGLE.degree, 1); //We give 1 meter as input - var units = angle.getAll(); //We get all ther others units + var units = angle.getAll(); //We get all the others units for (var unit in units) { //Let's print them print( @@ -40,7 +40,7 @@ void main() { 'Binary: ${numeralSystems.binary.stringValue}'); //We get the binary value print( 'Hexadecimal: ${numeralSystems.hexadecimal.stringValue}'); //We get the hexadecimal value - //Warning! Numeral systems conversion is the only conversion that need the input as a string, and not as a double/int for obvous reasons + //Warning! Numeral systems conversion is the only conversion that need the input as a string, and not as a double/int for obvious reasons //---------------------------------------------------------------------------- diff --git a/lib/models/double_property.dart b/lib/models/double_property.dart index f761760..2fbdf3f 100644 --- a/lib/models/double_property.dart +++ b/lib/models/double_property.dart @@ -33,7 +33,7 @@ abstract class DoubleProperty extends Property { /// Map between units and its symbol Map? mapSymbols; - /// The number of significan figures to keep. E.g. 1.23456789) has 9 + /// The number of significant figures to keep. E.g. 1.23456789) has 9 /// significant figures int significantFigures; diff --git a/lib/models/ratio_property.dart b/lib/models/ratio_property.dart index ed09564..ada853d 100644 --- a/lib/models/ratio_property.dart +++ b/lib/models/ratio_property.dart @@ -6,7 +6,7 @@ abstract class RatioProperty extends Property { /// Map between units and its symbol, must be of the same size of T Map mapSymbols; - /// The number of significan figures to keep. E.g. 1.23456789) has 9 + /// The number of significant figures to keep. E.g. 1.23456789) has 9 /// significant figures int significantFigures; diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 81a742c..9707a65 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -77,7 +77,7 @@ Property? getPropertyFromEnum(dynamic propertyEnum) { } } -/// Given a double value it returns its rapresentation as a string with few +/// Given a double value it returns its representation as a string with few /// tweaks: [significantFigures] is the number of significant figures to keep, /// [removeTrailingZeros] say if non important zeros should be removed. /// E.g. 1.000000 --> 1 diff --git a/test/conversion_test.dart b/test/conversion_test.dart index e6f59f9..b79ad28 100644 --- a/test/conversion_test.dart +++ b/test/conversion_test.dart @@ -1,7 +1,7 @@ import 'package:test/test.dart'; import 'package:units_converter/units_converter.dart'; -/// This function defines if a value is accettable. e.g. if we expect to have 1 but we get 1.00000000012, is this a valid result or not? +/// This function defines if a value is acceptable. e.g. if we expect to have 1 but we get 1.00000000012, is this a valid result or not? /// The term sensibility is used improperly. bool isAcceptable(double? convertedValue, double? expectedValue, sensibility) { if ((convertedValue == null && expectedValue != null) ||