about summary refs log tree commit diff
path: root/src/etc/htmldocck.py
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2016-05-16 14:26:49 +1000
committerHuon Wilson <dbau.pp+github@gmail.com>2016-05-17 08:06:56 +1000
commiteb67f492debf2ea7671d3859c42356cf43859de1 (patch)
tree48e8576c20f06b6a521d56aa5354a0c81d85122b /src/etc/htmldocck.py
parentbb39c4925a792b1dbb2bfa0323339fdf4297c4ac (diff)
downloadrust-eb67f492debf2ea7671d3859c42356cf43859de1.tar.gz
rust-eb67f492debf2ea7671d3859c42356cf43859de1.zip
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