diff options
| author | bors <bors@rust-lang.org> | 2016-05-23 13:31:59 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-05-23 13:31:59 -0700 |
| commit | 57ef015132ec09345b88d2ec20a9d9809b5d3dfc (patch) | |
| tree | e6e0530bc2d26d574e7d8bd9d4f98868ba4dbfc2 /src/etc/htmldocck.py | |
| parent | 1ccada6cd3d187abe3b4cbbb51b07fa8c0c61cea (diff) | |
| parent | eb67f492debf2ea7671d3859c42356cf43859de1 (diff) | |
| download | rust-57ef015132ec09345b88d2ec20a9d9809b5d3dfc.tar.gz rust-57ef015132ec09345b88d2ec20a9d9809b5d3dfc.zip | |
Auto merge of #33664 - huonw:abs_sub, r=alexcrichton
Deprecate {f32,f64}::abs_sub.
The abs_sub name is misleading: the function actually computes the
positive difference (`fdim` in C), not the `(x - y).abs()` that *many* people expect
from the name.
This function can be replaced with just `(x - y).max(0.0)`, mirroring
the `abs` version, but this behaves differently with NAN: `NAN.max(0.0)
== 0.0`, while `NAN.positive_diff(0.0) == NAN`. People who absolutely
need that behaviour can use the C function directly and/or talk to the libs
team (we haven't encountered a concrete use-case for this functionality).
Closes #30315.
Diffstat (limited to 'src/etc/htmldocck.py')
0 files changed, 0 insertions, 0 deletions
