Skip to content

Commit 1b628ab

Browse files
committed
0.1.14 Angle
1 parent 203420f commit 1b628ab

File tree

13 files changed

+398
-29
lines changed

13 files changed

+398
-29
lines changed

libraries/Angle/.github/workflows/arduino-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- uses: arduino/arduino-lint-action@v1
1111
with:
1212
library-manager: update

libraries/Angle/.github/workflows/arduino_test_runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
- uses: ruby/setup-ruby@v1
1313
with:
1414
ruby-version: 2.6

libraries/Angle/.github/workflows/jsoncheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
- name: json-syntax-check
1515
uses: limitusus/json-syntax-check@v1
1616
with:

libraries/Angle/Angle.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
//
22
// FILE: Angle.cpp
33
// AUTHOR: Rob Tillaart
4-
// VERSION: 0.1.13
4+
// VERSION: 0.1.14
55
// PURPOSE: library for Angle math for Arduino
66
// URL: https://github.com/RobTillaart/Angle
77
// http://forum.arduino.cc/index.php?topic=339402
8-
//
9-
// HISTORY: see changelog.md
108

119

1210
#include "Angle.h"
@@ -31,7 +29,6 @@ Angle::Angle(int dd, int mm, int ss, int tt)
3129
m = mm;
3230
s = ss;
3331
t = tt;
34-
// TODO
3532
// normalize();
3633
// assume only one (largest) parameter is negative at most...
3734
if (d < 0) { d = -d; neg = true; }
@@ -318,7 +315,7 @@ int Angle::compare(const Angle &a, const Angle &b)
318315
}
319316

320317

321-
void Angle::normalize() // TODO CHECK
318+
void Angle::normalize()
322319
{
323320
while (t < 0) { s--; t += 10000; }
324321
while (t >= 10000) { s++; t -= 10000; }

libraries/Angle/Angle.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
//
33
// FILE: Angle.h
44
// AUTHOR: Rob Tillaart
5-
// VERSION: 0.1.13
5+
// VERSION: 0.1.14
66
// PURPOSE: angle library for Arduino
7-
// HISTORY: See angle.cpp
7+
// URL: https://github.com/RobTillaart/Angle
8+
// http://forum.arduino.cc/index.php?topic=339402
89
//
910
// AngleFormat proxy added 03/03/15 by Christoper Andrews.
1011
//
@@ -15,7 +16,7 @@
1516
#include "Printable.h"
1617

1718

18-
#define ANGLE_LIB_VERSION (F("0.1.13"))
19+
#define ANGLE_LIB_VERSION (F("0.1.14"))
1920

2021

2122
class Angle;
@@ -97,5 +98,5 @@ class Angle: public Printable
9798
};
9899

99100

100-
// -- END OF FILE
101+
// -- END OF FILE
101102

libraries/Angle/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.1.14] - 2023-01-31
10+
- update GitHub actions
11+
- update license 2023
12+
- update readme.md
13+
- add performance sketch (initial version)
14+
15+
916
## [0.1.13] - 2022-10-12
1017
- Add RP2040 support to build-CI
1118
- Add CHANGELOG.md

libraries/Angle/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2015-2022 Rob Tillaart
3+
Copyright (c) 2015-2023 Rob Tillaart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

libraries/Angle/README.md

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,31 @@ The library implements the Printable interface, allowing one to call
2525

2626
**Serial.println(angle)** or **SD.print(angle)**.
2727

28+
Degree sign ° = ALT-0176 (Windows)
29+
30+
31+
#### Related
32+
33+
- https://github.com/RobTillaart/AngleConvertor
34+
- https://github.com/RobTillaart/AverageAngle
35+
- https://github.com/RobTillaart/Angle
36+
- https://github.com/RobTillaart/runningAngle
37+
2838

2939
## Interface
3040

31-
### Constructors
41+
```cpp
42+
#include "Angle.h"
43+
```
44+
45+
#### Constructors
3246

3347
- **Angle(int dd = 0, int mm = 0, int ss = 0, int tt = 0)** create an Angle, default is zero.
3448
- **Angle(double alpha)** create an Angle from a double.
3549
- **Angle(char \* str)** create an Angle from a string e.g. "45.31234".
3650

3751

38-
### base
52+
#### Base
3953

4054
- **int sign()** returns -1 or 1.
4155
- **int degree()** returns # degrees.
@@ -44,19 +58,21 @@ The library implements the Printable interface, allowing one to call
4458
- **int tenthousand()** returns # ten-thousands of a second.
4559

4660

47-
### Conversions
61+
#### Conversions
4862

4963
- **double toDouble()** returns the angle as a double (0..360.0, float on UNO).
5064
- **double toRadians()** returns the angle in radians (0..TWO_PI).
5165
- **void fromRadian(double rad)** create an angle from radians.
5266

67+
More conversions - https://github.com/RobTillaart/AngleConvertor
68+
5369

54-
### Equality operators
70+
#### Equality operators
5571

5672
The library supports equality operator "==", "!=", "<" "<=" ">" and ">=" .
5773

5874

59-
### Math operators
75+
#### Math operators
6076

6177
- **negate** returns -angle.
6278
- **addition** and **subtract** add angles to angles.
@@ -71,19 +87,33 @@ See examples.
7187

7288
## Note
7389

74-
The library has not been tested extensively and it could still contain
75-
bugs. Especially the constructor does not check input so use it carefully.
90+
The library has not been tested extensively and it could still contain bugs.
91+
Especially the constructor does not check input so use it carefully.
7692

7793

7894
## Future
7995

96+
#### Must
97+
8098
- improve documentation
81-
- test more
82-
- optimize code where possible
83-
- performance sketch
99+
100+
#### Should
101+
102+
- Test normalize code
103+
- unit tests, sketch?
104+
- test more
105+
- TOCHECK in code
84106
- improve code quality
85-
- fix TODO in code
86107
- use better variable names in code
87-
- move all code to .cpp
108+
109+
110+
#### Could
111+
112+
- optimize code where possible
113+
- low priority
114+
- move all code to .cpp
115+
- change output format to confirm standard 4°12'14.1234"
116+
117+
#### Wont
88118

89119

0 commit comments

Comments
 (0)