{"id":21180867,"url":"https://github.com/bytestring-net/mathio","last_synced_at":"2026-01-27T08:02:40.507Z","repository":{"id":186376890,"uuid":"675081028","full_name":"bytestring-net/mathio","owner":"bytestring-net","description":"Opinionated small scoped library for math used in other projects","archived":false,"fork":false,"pushed_at":"2024-10-23T15:54:34.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T16:49:32.866Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bytestring-net.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2023-08-05T17:54:46.000Z","updated_at":"2024-10-23T15:54:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"a5e824f2-38e7-462c-a34b-88dff5df324e","html_url":"https://github.com/bytestring-net/mathio","commit_stats":null,"previous_names":["bytestring-net/mathio"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bytestring-net/mathio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytestring-net%2Fmathio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytestring-net%2Fmathio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytestring-net%2Fmathio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytestring-net%2Fmathio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytestring-net","download_url":"https://codeload.github.com/bytestring-net/mathio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytestring-net%2Fmathio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28809336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-20T17:46:18.237Z","updated_at":"2026-01-27T08:02:40.489Z","avatar_url":"https://github.com/bytestring-net.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mathio 🚀️ \n\n[![License](https://img.shields.io/badge/License-MIT%20or%20Apache%202-blue.svg?label=license)](./LICENSE-MIT)\n[![crates.io](https://img.shields.io/crates/v/mathio.svg)](https://crates.io/crates/mathio)\n[![Released API docs](https://docs.rs/mathio/badge.svg)](https://docs.rs/mathio)\n\nA ***lightweight***, ***simple*** and ***straight-forward*** opinionated library for **math** used in other projects.\n\nCurrent features are:\n\n* Fractions\n* Tweening\n* Periods\n\n\n### === Examples ===\n\n**Fractions**\n\nGreat for expressing lossless floats\n``` rust\nuse mathio::Fraction;\n\nlet frac_1 = Fraction::new(2, 3);\nlet frac_2 = Fraction::new(3, 6);\n \nassert_eq!(frac_1 + frac_2, Fraction::new(7, 6));\nassert_eq!(frac_1 - frac_2, Fraction::new(1, 6));\nassert_eq!(frac_1 * frac_2, Fraction::new(1, 3));\nassert_eq!(frac_1 / frac_2, Fraction::new(4, 3));\nassert_eq!(frac_1 \u003e= frac_2, true);\n```\n\n**Periods**\n\nGood for clamping repeating values (angles, sin/cosine, etc.)\n``` rust\nlet period = 360.0;\nassert_eq!(315.0, periodical(period, -45.0));\nassert_eq!(45.0, periodical(period, 45.0));\nassert_eq!(0.0, periodical(period, 360.0));\nassert_eq!(90.0, periodical(period, 450.0));\n```\n\n### === Licensing ===\nReleased under both [APACHE](./LICENSE-APACHE) and [MIT](./LICENSE-MIT) licenses. Pick one that suits you the most!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytestring-net%2Fmathio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytestring-net%2Fmathio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytestring-net%2Fmathio/lists"}