MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / new

Method new

splashsurf_lib/src/kernel.rs:61–69  ·  view source on GitHub ↗
(compact_support_radius: R)

Source from the content-addressed store, hash-verified

59 /// Initializes a cubic spline kernel with the given compact support radius
60 #[replace_float_literals(R::from_float(literal))]
61 pub fn new(compact_support_radius: R) -> Self {
62 let h = compact_support_radius;
63 let sigma = 8.0 / (h * h * h);
64
65 Self {
66 compact_support_radius,
67 normalization: sigma,
68 }
69 }
70
71 /// The cubic spline function used by the cubic spline kernel
72 #[replace_float_literals(R::from_float(literal))]

Callers

nothing calls this directly

Calls 2

try_convertMethod · 0.45
evaluateMethod · 0.45

Tested by

no test coverage detected