Provide types for angle manipulation in rust.

Overview

angulus

crates.io docs.rs

Provides types for angle manipulation.

Features

  • serde : Serialization/deserialization support via serde.

Example

use angulus::{*, units::*};

fn main() {
    let alpha = Angle::DEG_90;
    let beta = Angle::RAD_FRAC_PI_4;
    let gamma: Angle<f32> = alpha + beta;

    // in radians : 1.5707964 rad + 0.7853982 rad = 2.3561945 rad
    println!(
        "in radians : {} + {} = {}",
        Radians(alpha),
        Radians(beta),
        Radians(gamma),
    );

    // in degrees : 90° + 45° = 135°
    println!(
        "in degrees : {} + {} = {}",
        Degrees(alpha),
        Degrees(beta),
        Degrees(gamma),
    );
}

License

Licensed under either of the following, at your choice:

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

You might also like...
🛠 SmartGPT is an experimental program meant to provide LLMs

🛠 SmartGPT is an experimental program meant to provide LLMs (particularly GPT-3.5 and GPT-4) with the ability to complete complex tasks without user input by breaking them down into smaller problems, and collecting information using the internet and other external sources.

Provide free GPT-3.5 API service by reverse engineering the login-free ChatGPT website.

ChatGPT Free API Provide free GPT-3.5 API service by reverse engineering the login-free ChatGPT website. Note: This service requires the IP to be able

A collection of numeric types and traits for Rust.

num A collection of numeric types and traits for Rust. This includes new types for big integers, rationals (aka fractions), and complex numbers, new t

Nederlandse programmeertaal. Geinterpreteerd en met dynamische types. Met bytecode compiler en virtual machine, in Rust.

Nederlang Nederlang is een geinterpreteerde programmeertaal, in het Nederlands! Met als bestandsnaam extensie.... .nl! Het maakt gebruik van dynamisch

Choose Rust types at compile-time via boolean constants

condtype Choose Rust types at compile-time via boolean constants, brought to you by Nikolai Vazquez. If you find this library useful, consider starrin

Count your code by tokens, types of syntax tree nodes, and patterns in the syntax tree. A tokei/scc/cloc alternative.

tcount (pronounced "tee-count") Count your code by tokens, types of syntax tree nodes, and patterns in the syntax tree. Quick Start Simply run tcount

Structopt derived ethers-rs types, useful for building Ethereum CLIs

ethers-structopt Provides ethers-compatible Structopt derives, useful for building Ethereum CLIs. Contributing Pull requests are welcome. For major ch

Allows processing of iterators of Result types

try-continue try-continue provides one method, try_continue, which allows you to work with iterators of type ResultT, _, as if they were simply iter

Utilites for working with `bevy_ecs` when not all types are known at compile time

bevy_ecs_dynamic Utilities for working with bevy_ecs in situations where the types you're dealing with might not be known at compile time (e.g. script

Comments
  • General improvement

    General improvement

    • Remove the unit system from angle types.
    • Rename MainAngle --> Angle.
    • Rename Angle --> UnboundedAngle.
    • Angle store value in radians but is considered unit-agnostic.
    • Force unit convertion at (de)serialization with the unit wrappers.
    • constantes alias for each unit.
    • Operations (add, sub) can no more be mixed between Angle (formerly MainAngle) and UnboundedAngle (formerly Angle).
    • Enhancement of the documentation.
    enhancement 
    opened by tguichaoua 0
Releases(v0.2.0)
  • v0.2.0(Sep 2, 2022)

    Angle are now unit-agnostic (even if they store the value in radians). The canonical angle is now the default angle (formerly MainAngle) and the non canonical angle is UnboundedAngle (formerly Angle).

    Display and (de)serialization of angle for a specific unit is now done via unit wrapper.

    Breaking changes

    • Remove the unit system from angle types.
    • Rename MainAngle --> Angle.
    • Rename Angle --> UnboundedAngle.
    • Remove operations (add and sub) between the two kind of angle.

    https://github.com/tguichaoua/angulus/compare/v0.1.0...v0.2.0

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Aug 30, 2022)

Owner
Tristan Guichaoua
🦀Rustaceans🦀
Tristan Guichaoua
Sudoku Solver using bitmasks and bit-manipulation with Rust 🦀 and egui 🎨

sudoku-solver Download This Rust application implements a very memory efficent algorithm to solve sudoku and lets the user know when a unique solution

cameron 24 Apr 10, 2023
PNG manipulation library.

pngmanip A simple rust library for parsing and manipulating PNG images, primarily at the chunk level. The intended use case was for solving PNG based

Sam Leonard 1 Jan 7, 2022
This CLI utility facilitates effortless manipulation and exploration of TOML, YAML, JSON and RON files.

???????? This CLI utility facilitates effortless manipulation and exploration of TOML, YAML, JSON and RON files.

Moe 3 Apr 26, 2023
A library that allows for the arbitrary inspection and manipulation of the memory and code of a process on a Linux system.

raminspect raminspect is a crate that allows for the inspection and manipulation of the memory and code of a running process on a Linux system. It pro

Liam Germain 24 Sep 26, 2023
Wrapper around atspi-code to provide higher-level at-spi Rust bindings

atspi Wrapper around atspi-codegen to provide higher-level at-spi Rust bindings. Contributions Take a look at our atspi-codegen crate, and try inpleme

Odilia 3 Feb 7, 2022
A Rust CLI to provide last publish dates for packages in a package-lock.json file

NPM Package Age A Rust CLI which if you provide a npm lockfile (package-lock.json to start), it will give you a listing of all of the packages & the l

Benjamin Lannon 1 Feb 4, 2022
Bevy Meshem is a Rust crate designed to provide meshing algorithms for voxel grids, enabling you to create cohesive 3D mesh structures from a grid of cubic voxels

Bevy Meshem Crates.io, docs Bevy Compatibility: Bevy Version bevy_meshem 0.11 main Bevy Meshem is a Rust crate designed to provide meshing algorithms

Adam 4 Aug 16, 2023
Provide CRUD CLI for Moco Activities with Jira Cloud Sync Option for faster time tracking.

Moco CLI Provide CRUD CLI for Moco Activities with Jira Cloud Sync Option for faster time tracking. Available commands Login Jira Must be called befor

Emanuel Vollmer 7 Nov 18, 2022
A library to provide abstractions to access common utilities when developing Dioxus applications.

?? Dioxus Standard Library ?? A platform agnostic library for supercharging your productivity with Dioxus. dioxus-std is a Dioxus standard library tha

Miles Murgaw 5 Nov 9, 2022
Just provide a macro for a certain programming language.

Trust me, this is safe! A macro wrap unsafe keyword into safe! macro. Always trust programmers. use std::alloc::{alloc, dealloc, Layout}; use trust_m

null 4 Dec 13, 2023