mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
use exact float comparison in number formatter for now
This commit is contained in:
parent
fecd239fcf
commit
5d1d1d43bc
|
@ -176,9 +176,9 @@ bool format_condition::satisfied_by(long double number) const
|
||||||
case condition_type::less_than:
|
case condition_type::less_than:
|
||||||
return number < value;
|
return number < value;
|
||||||
case condition_type::not_equal:
|
case condition_type::not_equal:
|
||||||
return std::fabs(number - value) >= std::numeric_limits<long double>::min();
|
return std::fabs(number - value) != 0.0L;
|
||||||
case condition_type::equal:
|
case condition_type::equal:
|
||||||
return std::fabs(number - value) < std::numeric_limits<long double>::min();
|
return std::fabs(number - value) == 0.0L;
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
default:
|
default:
|
||||||
throw xlnt::exception("unhandled");
|
throw xlnt::exception("unhandled");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user