All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased - ReleaseDate
0.9.2 - 2023-03-02
0.9.1 - 2022-10-06
- Add
repr(transparent)
(#31).
0.9.0 - 2022-09-08
- A new parsing method:
from_str_exact
. serde::repr_option
,serde::float_option
andserde::str_option
.- The
quick-xml
feature to support tag parsing.
- BREAKING CHANGE:
FromStr
andDeserialize
rounds to the nearest value. - BREAKING CHANGE:
serde::as_f64
is renamed toserde::float
,serde::as_string
toserde::str
andserde::as_repr
toserde::repr
. - BREAKING CHANGE: the
serde
feature is not enabled by default anymore. - BREAKING CHANGE: the
parity
feature doesn't enableparity-scale-codec/derive
anymore. - Deserialize from strings, floats and integers for human readable formats.
- Now
serde::*
work for wrappers aroundFixedPoint
too.
0.8.0 - 2022-06-23
- A new round mode:
RoundMode::Nearest
. - New methods:
signum
,floor
,ceil
andround
.
- Replace the
RoundingSqrt
trait with thersqrt
method.
- Deprecated methods
rounding_from_f64
andto_f64
. UseTryFrom<f64>
andInto<f64>
instead. - Remove
rounding_to_i64
. Use theintegral
method instead.
0.7.0 - 2022-05-15
- Rare "from
f64
" bugs (#25).
- Update
parity-scale-codec
tov3
(#26). - Optimize
From<f64>
instance (#25). - Optimize serialization to string and
Display
instance (#29).
0.6.1 - 2021-12-30
- serde: can be used in no_std environments (#24).
TryFrom<f64>
can be used in no_std environments (#22).
0.6.0 - 2021-07-01
serde::as_string
,serde::as_float
,serde::as_repr
.i64
,i32
,i16
features.
- To/from
f64
conversion (#25).
- No implementation is provided by default, use
i64
ori128
features. - (De)serialize
FixedPoint
as a string in case of human readable formats. ConvertError
andFromDecimalError
are merged into one opaqueConvertError
type.
0.5.1 - 2021-05-28
- docs: specify required features for feature-gated instances.
0.5.0 - 2021-03-24
- Trait
ops::RoundingSqrt
and its implementation forFixedPoint
andint
s (#17). ArithmeticError::DomainViolation
error for attempts to compute a square root of a negative number (#17).
FixedPoint::half_sum
now takesRoundMode
parameter (#17).
0.4.0 - 2021-03-05
- Update
parity-scale-codec
tov2
(#16).
0.3.1 - 2021-02-16
- Method
FixedPoint::into_bits
(#14). - More thorough feature testing (#13).
- "Compile fail" test for
fixnum_const!
macro (#13).
- Unit tests for default fixnum feature set and
i128
feature were unified (#13).
0.3.0 - 2021-01-25
- Support of
fixnum::ops::Numeric
(#10).
- Traits
ops::One
,ops::Zero
,ops::Bounded
. - Saturating operations (#10):
CheckedAdd::saturating_add
,CheckedMul::saturating_mul
,CheckedSub::saturating_sub
,RoundingMul::saturating_rmul
.
0.2.3 - 2020-12-30
- Const fixed-point literal macro
fixnum_const!
(#11). Compact
implementation forparity
feature (#9).Clone
implementation for errors (#9).
parity
'sEncode
andDecode
impls (#9).
0.2.2 - 2020-12-09
parity-scale-codec
support under theparity
feature:Encode
andDecode
instances (#8).fixnum!
macro for compile-time-checked fixed-point "literals"..as_str()
was implemented for errors (#8).
- Added
$crate
prefix forimpl_op
macro (#8).
0.2.1 - 2020-12-04
- Docs' links were fixed (#6).
0.2.0 - 2020-12-04
- Support of
fixnum::ops::CheckedDiv
(#5).
- There's no need in
uint
crate anymore. This significantly helps inno_std
environments (#5).
0.1.0 - 2020-12-03
- Initial release.