Skip to content
/ ngau Public

Non-Generic Angular Units

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

anderejd/ngau

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NGAU: Non-Generic Angular Units

Minimal, non-generic newtype wrappers for the angular operations provided by the Rust standard library.

The purpose of this library is to provide some type safety for angular units compared to using plain f32 and f64.

Features

  • Zero dependecies.
  • No generics.
  • No macros.
  • Optional Serde support.

The functions provided by this libarary are intended to be used instead of the standard library f32::sin, f32::cos etc. that return naked f32 values. Instead, the functions with the same names in this library return either a Rad or Deg, eg. Rad::sin return a Rad, unlike the f32::sin in the standard library that return a naked f32 radian value.

It was created to fill in some holes while migrating a project from cgmath to glam.

Roadmap

  • Add another module for f64 angle types (?).
  • Benchmark and experiment with #[inline].

License

This repository is licensed under either of

at your option.

Contribution Licensing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Non-Generic Angular Units

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages