oxiphysics_geometry/implicit_geometry/sdfscale_traits.rs
1//! # SdfScale - Trait Implementations
2//!
3//! This module contains trait implementations for `SdfScale`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Sdf`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use super::functions::*;
12use super::types::SdfScale;
13
14impl<S: Sdf> Sdf for SdfScale<S> {
15 fn dist(&self, p: [f64; 3]) -> f64 {
16 self.inner.dist(scale(p, 1.0 / self.factor)) * self.factor
17 }
18}