Trevor Spiteri
348463d204
state aims at top of documentation
2019-08-23 10:03:59 +02:00
Trevor Spiteri
3292a2da26
some minor doc improvements
2019-08-22 14:26:08 +02:00
Trevor Spiteri
9e333d99c2
add round_to_zero
2019-08-22 13:39:51 +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
381af22e96
make {,wrapping_,overflowing_}abs const
2019-08-21 15:46:24 +02:00
Trevor Spiteri
ba594f24e1
document bug fix in release notes
2019-08-21 13:30:49 +02:00
Trevor Spiteri
8176a36a95
version 0.4.3
2019-08-20 19:40:53 +02:00
Trevor Spiteri
fa271a4a9d
doc updates
2019-08-20 16:42:37 +02:00
Trevor Spiteri
daa600bb71
properly handle precision in Display
2019-08-19 23:53:43 +02:00
Trevor Spiteri
02255757b4
Wrapping::from_str was moved to impl FromStr
2019-08-19 01:16:53 +02:00
Trevor Spiteri
a2249ea232
add {saturating,wrapping_overflowing}_from_str{,_binary,_octal,_hex}
2019-08-19 00:30:02 +02:00
Trevor Spiteri
cba3907e37
from_str now rounds ties to even
2019-08-17 23:57:39 +02:00
Trevor Spiteri
1ba116110c
fix link in 0.4.3 news
2019-08-17 18:48:56 +02:00
Trevor Spiteri
28885e09ab
make INT_NBITS and FRAC_NBITS constants public
2019-08-17 17:55:50 +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
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
9eab1c5be9
add {from,to}_num, deprecate sealed::{Int,Float,Fixed}
...
* new methods from_num, to_num, and their checked versions
* deprecate all other from_* and to_*, except for the FromFixed and
ToFixed traits
* deprecate sealed::{Fixed,Int,Float}
* removed SealedFixed, replace Sealed{Int,Float} with
{Int,Float}Helper
2019-08-16 15:45:26 +02:00
Trevor Spiteri
aac10de995
add from* methods to Wrapping
2019-08-15 14:38:27 +02:00
Trevor Spiteri
e740a88547
very long decimal fraction strings are now parsed correctly
2019-08-13 19:01:01 +02:00
Trevor Spiteri
ea84e11808
version 0.4.1
2019-08-12 14:25:51 +02:00
Trevor Spiteri
af02209c48
add from_str_{binary,octal,hex} to traits::Fixed
2019-08-10 19:14:15 +02:00
Trevor Spiteri
1a9816486c
add FromStr supertrait to traits::Fixed
2019-08-09 22:38:09 +02:00
Trevor Spiteri
c64a2fce0a
version 0.4.0
2019-08-08 23:25:05 +02:00
Trevor Spiteri
a4b243ce7e
remove deprecated methods
2019-08-08 22:47:49 +02:00
Trevor Spiteri
4f1a9b3bd3
tweaks
2019-08-06 21:56:47 +02:00
Trevor Spiteri
0ebf6a87a0
add consts module
2019-08-06 18:53:41 +02:00
Trevor Spiteri
1d13dfa7a1
implement almost all methods in Fixed{,Signed,Unsigned} traits
...
Conversions that can be handled using FromFixed and toFixed are not
included.
2019-08-06 16:43:39 +02:00
Trevor Spiteri
3f7822b7e5
add saturating_neg and saturating_abs
2019-08-06 16:35:58 +02:00
Trevor Spiteri
5fa0b53ddc
clean up sealed traits and split off new traits::Fixed
2019-08-06 14:40:58 +02:00
Trevor Spiteri
91a4ba3de7
mention new rustc requirement in release notes
2019-08-03 01:26:32 +02:00
Trevor Spiteri
62457d201d
Merge branch 'edition_2018' into 'master'
...
Move to edition 2018
See merge request tspiteri/fixed!1
2019-08-02 23:15:29 +00:00
Trevor Spiteri
a028cb07a9
next version will be 0.4.0 because of incompatible change
2019-08-02 19:01:46 +02:00
jean-airoldie
e67a943979
Move to edition 2018
...
* Bumped minimum rustc version to 1.31.1
2019-08-02 11:19:49 -04:00
Trevor Spiteri
225a0e8307
update release notes to mention new traits
2019-08-02 15:40:22 +02:00
Trevor Spiteri
419e291507
version 0.3.3
2019-06-27 23:54:28 +02:00
Trevor Spiteri
8a13d678b6
document conversions to/from {isize,usize}
2019-06-27 23:31:34 +02:00
Trevor Spiteri
5aeeeca16e
fix README link
2019-05-28 14:24:59 +02:00
Trevor Spiteri
ded37197a6
version 0.3.2
2019-02-27 22:52:15 +01:00
Trevor Spiteri
e091e76d52
version 0.3.1
2019-02-07 00:59:41 +01:00
Trevor Spiteri
af9cda1078
reimplement From<bool> for fixed-point numbers
2019-02-04 12:46:42 +01:00
Trevor Spiteri
004077a002
version 0.3.0
2019-02-03 21:37:17 +01:00
Trevor Spiteri
27f8f57f90
deprecate/rename {int,frac}_bits -> {int,frac}_nbits
2019-02-03 20:36:08 +01:00
Trevor Spiteri
27c9ee7b0f
implement comparisons between fixed and float
2019-02-03 20:25:37 +01:00
Trevor Spiteri
1251b4fed4
typo
2019-02-02 23:54:29 +01:00
Trevor Spiteri
c997c4ffeb
remove bool from Int trait
2019-02-02 23:53:03 +01:00
Trevor Spiteri
78cb0ea9b6
generalize comparisons between fixeds and ints
2019-02-02 23:45:03 +01:00
Trevor Spiteri
7e9e3ef04d
{saturating,wrapping,overflowing}_to_{fixed,int}
2019-02-01 20:46:51 +01:00
Trevor Spiteri
3b3d22fc6f
remove checked_to_float
2019-02-01 14:53:25 +01:00
Trevor Spiteri
ed3ed75093
add from_fixed to trait Float
2019-02-01 14:53:14 +01:00
Trevor Spiteri
9c22e037c0
add from_fixed plus checked versions to trait Int
2019-02-01 14:45:17 +01:00
Trevor Spiteri
f7300c7f8a
add to_fixed plus checked versions to traits Int and Float
2019-02-01 02:40:35 +01:00
Trevor Spiteri
c9e9686ac4
consistent {to,checked_to}_{fixed,int,float}, some doc updates
2019-02-01 01:13:53 +01:00
Trevor Spiteri
87b00f66a2
add to_fixed
2019-01-29 23:20:38 +01:00
Trevor Spiteri
d5e135889c
version 0.2.1
2019-01-29 23:16:09 +01:00
Trevor Spiteri
009142f2af
add anther example to main doc
2019-01-29 21:55:58 +01:00
Trevor Spiteri
455a770f03
fix display precision bug
2019-01-29 21:47:55 +01:00
Trevor Spiteri
c1a0f04af0
update release notes
2019-01-29 18:34:12 +01:00
Trevor Spiteri
1725b12340
version 0.2.0
2019-01-29 03:35:42 +01:00
Trevor Spiteri
3fbd016ac6
fix to_int and deprecate to_int_{ceil,floor,round}
...
to_int was not truncating fractional bits for negative numbers with
non-zero fractions, but was rounding towards zero instead.
2019-01-29 03:04:02 +01:00
Trevor Spiteri
1816b6e2bd
update release notes
2019-01-29 02:13:19 +01:00
Trevor Spiteri
02ea584ac0
update release notes
2019-01-28 22:43:43 +01:00
Trevor Spiteri
2a7cf2c4b5
complete from_float family of functions
...
Now from_float, checked_from_float, saturating_from_float,
wrapping_from_float and overflowing_from_float are all implemented.
2019-01-28 19:45:33 +01:00
Trevor Spiteri
2a15782e95
fix README example
2019-01-28 05:24:10 +01:00
Trevor Spiteri
3724d461b6
document that signum can panic if the signum cannot be represented
2019-01-28 04:30:56 +01:00
Trevor Spiteri
b3f2d2d120
replace {to,from}_{f16,f32,f64} -> {to,from}_float
2019-01-28 03:41:44 +01:00
Trevor Spiteri
2a2395af10
version 0.1.6: serde support
2019-01-27 00:39:24 +01:00
Trevor Spiteri
26dbf7059c
version 0.1.5: mention types module in release notes
2019-01-26 22:22:18 +01:00
Trevor Spiteri
9b8e36a71d
version 0.1.5
2019-01-26 22:02:58 +01:00
Trevor Spiteri
59b407ba61
add bool to fixed conversion
2019-01-26 21:44:34 +01:00
Trevor Spiteri
b71b41cd70
implement infallible fixed to primitive conversions
2019-01-26 21:16:20 +01:00
Trevor Spiteri
c69544b9a0
version 0.1.4
2018-11-29 09:55:39 +01:00
Trevor Spiteri
a2a7254a48
update release notes
2018-11-03 17:23:18 +01:00
Trevor Spiteri
7017687a9a
version 0.1.3
2018-08-23 13:32:59 +02:00
Trevor Spiteri
932caf3f92
add f16 feature
2018-08-23 13:12:32 +02:00
Trevor Spiteri
69254eadac
version 0.1.2
2018-08-15 20:14:36 +02:00
Trevor Spiteri
d6d65f8af4
add is_positive and is_negative
2018-08-14 17:47:29 +02:00
Trevor Spiteri
364b4ef23c
implement from_f32 and from_f64
2018-08-14 00:21:29 +02:00
Trevor Spiteri
f043eacbfa
require rustc 1.28.0
2018-08-13 12:10:53 +02:00
Trevor Spiteri
0b2405233a
std is not an option any more
2018-08-12 22:39:13 +02:00
Trevor Spiteri
6998d667b1
add support for no_std
2018-08-12 12:11:28 +02:00
Trevor Spiteri
10aca6f626
version 0.1.1
2018-08-11 21:10:03 +02:00
Trevor Spiteri
2dcf0afdf5
comparisons for all numbers with same inner type
2018-08-11 20:21:29 +02:00
Trevor Spiteri
f2d5f232d4
tweak quick example in README
2018-08-11 17:49:46 +02:00
Trevor Spiteri
4250151943
add quick example to README
2018-08-11 17:33:31 +02:00
Trevor Spiteri
d3873b741e
fix link typo in README
2018-08-11 17:21:24 +02:00
Trevor Spiteri
8f64db356a
add from_int, to_int*, frac and int methods
2018-08-11 17:19:17 +02:00
Trevor Spiteri
3d09bca07b
implement overflowing multiplication and division by integers
2018-08-11 00:29:00 +02:00
Trevor Spiteri
1b74d10232
add public methods int_bits and frac_bits
2018-08-10 21:28:24 +02:00
Trevor Spiteri
e429dbd869
fix links in top-level docs
2018-08-10 21:01:52 +02:00
Trevor Spiteri
39b9653f8e
version 0.1.0
2018-08-10 20:57:59 +02:00
Trevor Spiteri
8c9ee77cef
update top level docs
2018-08-10 20:43:53 +02:00
Trevor Spiteri
ca3e48f699
update top level docs
2018-08-10 20:30:03 +02:00
Trevor Spiteri
a6cab63bb5
use typenum
2018-08-10 17:45:08 +02:00
Trevor Spiteri
ba98a18082
include license headers
2018-08-10 11:34:17 +02:00
Trevor Spiteri
28a97a6ff7
update README
2018-08-10 11:13:42 +02:00
Trevor Spiteri
3b3fcd7047
version 0.0.0
2018-08-09 20:02:34 +02:00