IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

cubic_filter

def cubic_filter(x: Float32, a: Float32) -> Float32

Evaluates the Keys cubic convolution filter.

A more negative a gives a sharper result.

Args:

  • ​x (Float32): The signed distance from the filter center.
  • ​a (Float32): The cubic coefficient.

Returns:

Float32: The filter weight, zero for |x| >= 2.

Was this page helpful?