i2f

Crates.ioi2f
lib.rsi2f
version0.1.0
sourcesrc
created_at2023-10-15 02:45:41.773647
updated_at2023-10-15 02:45:41.773647
descriptionMacros that converts number literals into int or float literals.
homepage
repositoryhttps://github.com/mintlu8/identconv
max_upload_size
id1003438
size10,056
Mincong Lu (mintlu8)

documentation

README

i2f

Macros that converts number literals into int or float literals.

In addition to literals, we also accept negative literals -literal.

Examples

i2f!(90)        //90.0
i2f!(-462)      //-462.0
i2f!(3.14)      //3.14
f2i!(3),        //3
f2i!(3.0),      //3
trunc!(3.14),   //3
f2i!(-12.0),    //-12
Commit count: 13

cargo fmt