round_frule

Function round_frule 

Source
pub fn round_frule<R: Float>(x: R, _dx: R) -> (R, R)
Expand description

Forward rule for round.

The tangent is always zero.

ยงExamples

use chainrules::round_frule;

let (y, dy) = round_frule(1.6_f64, 0.75);
assert_eq!(y, 2.0);
assert_eq!(dy, 0.0);