Change default tolerance value to not depend on units (#6055)

This commit is contained in:
Jonathan Tran
2025-03-31 15:28:15 -04:00
committed by GitHub
parent 0b1e79871f
commit d8e84cb5e3
5 changed files with 15 additions and 24 deletions

View File

@ -278,6 +278,9 @@ pub enum FunctionKind {
UserDefined,
}
/// The default tolerance for modeling commands in [`kittycad_modeling_cmds::length_unit::LengthUnit`].
const DEFAULT_TOLERANCE: f64 = 0.0000001;
/// Compute the length of the given leg.
pub async fn leg_length(_exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let (hypotenuse, leg, ty) = args.get_hypotenuse_leg()?;