{"id":13893854,"url":"https://github.com/RobTillaart/Angle","last_synced_at":"2025-07-17T08:31:08.756Z","repository":{"id":45447762,"uuid":"250274504","full_name":"RobTillaart/Angle","owner":"RobTillaart","description":"Arduino library for basic math for Angles in degrees, minute, seconds","archived":false,"fork":false,"pushed_at":"2024-04-13T08:51:14.000Z","size":32,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-19T06:34:28.123Z","etag":null,"topics":["angle","degrees","math","radians"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobTillaart.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"RobTillaart","custom":"https://www.paypal.me/robtillaart"}},"created_at":"2020-03-26T14:02:57.000Z","updated_at":"2024-10-20T21:46:42.000Z","dependencies_parsed_at":"2024-11-19T06:41:29.275Z","dependency_job_id":null,"html_url":"https://github.com/RobTillaart/Angle","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FAngle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FAngle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FAngle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FAngle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobTillaart","download_url":"https://codeload.github.com/RobTillaart/Angle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226243893,"owners_count":17594452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angle","degrees","math","radians"],"created_at":"2024-08-06T18:01:18.497Z","updated_at":"2024-11-24T22:30:39.010Z","avatar_url":"https://github.com/RobTillaart.png","language":"C++","funding_links":["https://github.com/sponsors/RobTillaart","https://www.paypal.me/robtillaart"],"categories":["C++"],"sub_categories":[],"readme":"\n[![Arduino CI](https://github.com/RobTillaart/Angle/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)\n[![Arduino-lint](https://github.com/RobTillaart/Angle/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/Angle/actions/workflows/arduino-lint.yml)\n[![JSON check](https://github.com/RobTillaart/Angle/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/Angle/actions/workflows/jsoncheck.yml)\n[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/Angle.svg)](https://github.com/RobTillaart/Angle/issues)\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/Angle/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/RobTillaart/Angle.svg?maxAge=3600)](https://github.com/RobTillaart/Angle/releases)\n[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/Angle.svg)](https://registry.platformio.org/libraries/robtillaart/Angle)\n\n\n# Angle\n\nArduino library for basic math for Angles in degrees, minute, seconds and ten-thousands.\n\n\n## Description\n\nAngle is an Arduino class to print, compare and do basic maths with angles\nin degrees, minutes seconds and ten-thousands. The class was created to be\nable to print an angle with minutes and seconds instead of as a floating point\nor radians.\n\nTo make the library more useful basic maths ( + - \\* / ) \nand comparisons ( == != \u003c \u003c= \u003e \u003e= ) are added to the class.\n\nThe library implements the Printable interface, allowing one to call\n\n**Serial.println(angle)** or **SD.print(angle)**.\n\nDegree sign ° = ALT-0176 (Windows)\n\n\n#### Related\n\n- https://github.com/RobTillaart/AngleConvertor\n- https://github.com/RobTillaart/AverageAngle\n- https://github.com/RobTillaart/Angle\n- https://github.com/RobTillaart/runningAngle\n\n\n## Interface\n\n```cpp\n#include \"Angle.h\"\n```\n\n#### Constructors\n\n- **Angle(int dd = 0, int mm = 0, int ss = 0, int tt = 0)** create an Angle, default is zero.\n- **Angle(double alpha)** create an Angle from a double.\n- **Angle(char \\* str)** create an Angle from a string e.g. \"45.31234\".\n\n\n#### Base\n\n- **int sign()** returns -1 or 1.\n- **int degree()** returns # degrees.\n- **int minute()** returns # minutes.\n- **int second()** returns # seconds.\n- **int tenthousand()** returns # ten-thousands of a second.\n\n\n#### Conversions\n\n- **double toDouble()** returns the angle as a double (0..360.0, float on UNO).\n- **double toRadians()** returns the angle in radians (0..TWO_PI).\n- **void fromRadian(double rad)** create an angle from radians.\n\nMore conversions - https://github.com/RobTillaart/AngleConvertor\n\n\n#### Equality operators\n\nThe library supports equality operator \"==\", \"!=\", \"\u003c\" \"\u003c=\" \"\u003e\" and \"\u003e=\" .\n\n\n#### Math operators\n\n- **negate** returns -angle.\n- **addition** and **subtract** add angles to angles.\n- **multiplication** and **division** multiply an angle with a double.\n- **ratio**  ratio = Angle/Angle.\n\n\n## Operation\n\nSee examples.\n\n\n## Note\n\nThe library has not been tested extensively and it could still contain bugs. \nEspecially the constructor does not check input so use it carefully.\n\n\n## Future\n\n#### Must\n\n- improve documentation\n\n#### Should\n\n- Test normalize code\n  - unit tests, sketch?\n- test more \n  - TOCHECK in code\n- improve code quality\n\n\n#### Could\n\n- optimize code where possible\n  - low priority\n- move all code to .cpp\n- change output format to confirm standard 4°12'14.1234\"\n\n#### Wont\n\n\n## Support\n\nIf you appreciate my libraries, you can support the development and maintenance.\nImprove the quality of the libraries by providing issues and Pull Requests, or\ndonate through PayPal or GitHub sponsors.\n\nThank you,\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRobTillaart%2FAngle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRobTillaart%2FAngle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRobTillaart%2FAngle/lists"}