const-frac

Crates.ioconst-frac
lib.rsconst-frac
version0.0.4
sourcesrc
created_at2022-03-01 13:23:11.364859
updated_at2022-03-13 05:47:47.587748
descriptionTypes for supporting floating point constants.
homepagehttps://gitlab.com/fton/const-frac
repositoryhttps://gitlab.com/fton/const-frac
max_upload_size
id541539
size63,627
(fton)

documentation

README

Latest Release pipeline status coverage report

Description

Utilities for calculating floating point constants in const context.

This package is not intended heavy numerical calculation but just evaluating floating point constants in const contest.

Usage

use ::const_frac::Frac;

const RAD2DEG: f64 = Frac::from_ratio(360, 2, 0).mul(Frac::from_exp_pi(-1)).to_f64();

assert_eq!(RAD2DEG * std::f64::consts::PI, 180f64);

Features

This package has the following feature flags. No feature flags are enabled by default.

Project status

This package is in the very early stage.

Commit count: 19

cargo fmt