Commit Graph

328 Commits

Author SHA1 Message Date
Trevor Spiteri 50ca556686 version 0.4.4 2019-08-24 13:15:28 +02:00
Trevor Spiteri 82c7781f0e update README and doc main page 2019-08-24 13:10:49 +02:00
Trevor Spiteri 97e57bad0e fix unused warning 2019-08-23 14:16:36 +02:00
Trevor Spiteri c6e0563257 clippy + fmt 2019-08-23 14:06:28 +02:00
Trevor Spiteri 72f619b757 do not use f16::from_{f32,f64} from half crate 2019-08-23 14:03:39 +02:00
Trevor Spiteri 348463d204 state aims at top of documentation 2019-08-23 10:03:59 +02:00
Trevor Spiteri e24a0963f6 add Frac type to Fixed trait 2019-08-22 19:30:52 +02:00
Trevor Spiteri 3292a2da26 some minor doc improvements 2019-08-22 14:26:08 +02:00
Trevor Spiteri 87d30cd8b1 reorder some methods 2019-08-22 14:03:32 +02:00
Trevor Spiteri 9e333d99c2 add round_to_zero 2019-08-22 13:39:51 +02:00
Trevor Spiteri 7d08654e0a cleaner rounding examples 2019-08-22 13:04:39 +02:00
Trevor Spiteri 0eade78071 add round_ties_to_even and checked variants 2019-08-22 13:01:28 +02:00
Trevor Spiteri b3796a46f0 make is_power_of_two a const fn 2019-08-21 22:15:36 +02:00
Trevor Spiteri 696361a8fa macro formatting 2019-08-21 16:57:52 +02:00
Trevor Spiteri 381af22e96 make {,wrapping_,overflowing_}abs const 2019-08-21 15:46:24 +02:00
Trevor Spiteri 895d59611d fix and expand rounding test 2019-08-21 15:45:55 +02:00
Trevor Spiteri ba594f24e1 document bug fix in release notes 2019-08-21 13:30:49 +02:00
Trevor Spiteri 08fc9881e5 make display code clearer 2019-08-21 13:02:43 +02:00
Trevor Spiteri 8176a36a95 version 0.4.3 2019-08-20 19:40:53 +02:00
Trevor Spiteri f423fe0159 impl {Shl,Shr}{,Assign}<all primitives> for Wrapping 2019-08-20 17:07:13 +02:00
Trevor Spiteri 184eaddfc0 reduce number of times examples are tested in CI 2019-08-20 16:46:39 +02:00
Trevor Spiteri fa271a4a9d doc updates 2019-08-20 16:42:37 +02:00
Trevor Spiteri 46049bb7ac tweak consts example 2019-08-20 15:31:39 +02:00
Trevor Spiteri 0b4dac8d33 reorganize modules 2019-08-20 15:30:23 +02:00
Trevor Spiteri 96107159f5 some cleanups in tests inside display.rs 2019-08-20 01:18:22 +02:00
Trevor Spiteri daa600bb71 properly handle precision in Display 2019-08-19 23:53:43 +02:00
Trevor Spiteri 2d5a5c3ada properly handle precision in Binary, Octal, LowerHex, UpperHex 2019-08-19 18:49:40 +02:00
Trevor Spiteri 76a0abe468 relax some trait bounds in Wrapping
* Now bitwise and shifting operations do not require F: Fixed, only
    F: Op. For example

        impl BitAnd<Wrapping<F>> for Wrapping<F>

    is now bound by

        where F: BitAnd<F, Output = F>

    instead of

        where F: Fixed

  * Also multiplication and division by integers do not require Frac
    bounds. For example

        impl Mul<i8> for Wrapping<FixedI8<Frac>>

    now has no bounds on Frac, instead of being bound by

        where Frac: LeEqU8
2019-08-19 14:15:06 +02:00
Trevor Spiteri a501829cc6 change rhs type of Wrapping shift operators from usize to u32 2019-08-19 13:18:54 +02:00
Trevor Spiteri 960a782799 consolidate the trait impls for Wrapping 2019-08-19 02:02:06 +02:00
Trevor Spiteri 02255757b4 Wrapping::from_str was moved to impl FromStr 2019-08-19 01:16:53 +02:00
Trevor Spiteri 86c04e4830 rename Wrapping::wrapping_from_str* -> Wrapping::from_str* 2019-08-19 01:01:30 +02:00
Trevor Spiteri a2249ea232 add {saturating,wrapping_overflowing}_from_str{,_binary,_octal,_hex} 2019-08-19 00:30:02 +02:00
Trevor Spiteri 8bd4d5e9a7 add support for wrapping from_str_radix 2019-08-19 00:07:57 +02:00
Trevor Spiteri 995fe63f8a fix tests on rustc 1.34 2019-08-18 01:14:35 +02:00
Trevor Spiteri cba3907e37 from_str now rounds ties to even 2019-08-17 23:57:39 +02:00
Trevor Spiteri b15a1e8ef0 from_str_{binary,octal,hex} now rounds ties to even 2019-08-17 21:46:50 +02:00
Trevor Spiteri 1ba116110c fix link in 0.4.3 news 2019-08-17 18:48:56 +02:00
Trevor Spiteri 07ea3ff1ae use constants {INT,FRAC}_NBITS instead of methods where possible 2019-08-17 18:21:04 +02:00
Trevor Spiteri 3f7d1f42a5 simplify consts.rs 2019-08-17 18:15:36 +02:00
Trevor Spiteri 28885e09ab make INT_NBITS and FRAC_NBITS constants public 2019-08-17 17:55:50 +02:00
Trevor Spiteri 27f3da832f do not test for TryFrom in build.rs as rustc 1.34.0 is now required 2019-08-17 17:17:31 +02:00
Trevor Spiteri 1a859f2033 20 more const functions 2019-08-17 17:10:55 +02:00
Trevor Spiteri 0e96ea1243 depend on rustc 1.34.0 (for some const functions) 2019-08-17 16:52:08 +02:00
Trevor Spiteri 2518b6b147 make const functions: min_value, max_value, from_bits, to_bits 2019-08-17 16:45:09 +02:00
Trevor Spiteri b46789da36 divide inherent methods into impl<Frac> and impl<Frac: LeEqU*> 2019-08-17 16:35:25 +02:00
Trevor Spiteri 943dc6abe2 remove deprecated functions from README examples 2019-08-16 23:42:29 +02:00
Trevor Spiteri 9e671fced6 version 0.4.2 2019-08-16 23:25:19 +02:00
Trevor Spiteri 9ec8927ad5 add consts::FRAC_TAU_12, as 30 degrees is a useful constant 2019-08-16 23:09:13 +02:00
Trevor Spiteri 71a38079a3 use 6 significant digits in docs for constants 2019-08-16 23:01:27 +02:00