{"id":20989875,"url":"https://github.com/robtillaart/angle","last_synced_at":"2025-09-03T22:35:19.911Z","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":"2025-08-16T13:24:47.000Z","size":41,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-16T15:25:20.724Z","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":"2025-08-16T13:24:31.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":11,"template":false,"template_full_name":null,"purl":"pkg:github/RobTillaart/Angle","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","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobTillaart%2FAngle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273523169,"owners_count":25120860,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-19T06:26:34.151Z","updated_at":"2025-09-03T22:35:19.901Z","avatar_url":"https://github.com/RobTillaart.png","language":"C++","funding_links":["https://github.com/sponsors/RobTillaart","https://www.paypal.me/robtillaart"],"categories":[],"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### 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\nAs always feedback is welcome\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### Base\n\n- **bool isZero()** returns true if angle is 0.\n- **int sign()** returns -1 or 1. Zero degrees will return 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### 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\nFor more conversions check - 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\nThe library supports:\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## 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"}