Files
modeling-app/rust/kcl-lib/clippy.toml
Jonathan Tran 7486d25cf1 Change KCL stdlib floating-point results to not be platform dependent (#7499)
* Add libm dependency

* Change to use libm for trig functions

* Remove redactions for floating point

* Update output

* Use clippy to prevent stdlib math sneaking back in

---------

Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
2025-06-17 01:34:50 +00:00

20 lines
2.0 KiB
TOML

enum-variant-size-threshold = 48
disallowed-methods = [
{ path = "f64::sin", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f64::cos", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f64::tan", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f64::asin", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f64::acos", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f64::atan", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f64::atan2", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f32::sin", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f32::cos", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f32::tan", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f32::asin", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f32::acos", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f32::atan", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
{ path = "f32::atan2", reason = "Use trig functions from libm crate instead, to ensure FP math works the same across OSs and platforms."},
]