Skip to content

Commit 02b3c87

Browse files
committed
Replace legacy numeric constants core/std::f64::NAN with f64::NAN
1 parent 1a35cc7 commit 02b3c87

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: src/inner_op/helmert.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn helmert_common(
4444
let mut TT = [T[0], T[1], T[2]];
4545
let mut SS = S;
4646

47-
let mut prev_t = std::f64::NAN;
47+
let mut prev_t = f64::NAN;
4848
let n = operands.len();
4949
for i in 0..n {
5050
let mut c = operands.get_coord(i);
@@ -167,10 +167,10 @@ pub const GAMUT: [OpParameter; 25] = [
167167
OpParameter::Real { key: "ds", default: Some(0f64) }, // TODO: scale by 1e-6
168168

169169
// Epoch - "beginning of time for this transformation"
170-
OpParameter::Real { key: "t_epoch", default: Some(std::f64::NAN) },
170+
OpParameter::Real { key: "t_epoch", default: Some(f64::NAN) },
171171

172172
// Fixed observation time - ignore the fourth coordinate.
173-
OpParameter::Real { key: "t_obs", default: Some(std::f64::NAN) },
173+
OpParameter::Real { key: "t_obs", default: Some(f64::NAN) },
174174
];
175175

176176
pub fn new(parameters: &RawParameters, _ctx: &dyn Context) -> Result<Op, Error> {
@@ -581,7 +581,7 @@ mod tests {
581581
let definition = "
582582
helmert exact convention = coordinate_frame
583583
angular_velocity = 0.00150379, 0.00118346, 0.00120716
584-
t_epoch = 2020.0
584+
t_epoch = 2020.0
585585
";
586586
let op = ctx.op(definition)?;
587587

Diff for: src/inner_op/somerc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ fn inv(op: &Op, _ctx: &dyn Context, operands: &mut dyn CoordinateSet) -> usize {
116116
j -= 1;
117117
}
118118
if j <= 0 {
119-
operands.set_xy(i, core::f64::NAN, core::f64::NAN);
119+
operands.set_xy(i, f64::NAN, f64::NAN);
120120
continue;
121121
} else {
122122
operands.set_xy(i, lam, phi);

0 commit comments

Comments
 (0)