spacr.qt.fractal_defaults

The fractal’s numbers, importable without Qt, numba or vispy.

preferences needs the defaults and the clamp to read a stored value, and preferences is imported before the first window exists. Reaching into widgets.fractal_travel for them would pull numpy and numba onto the launch path for every ordinary session – a module nothing but spaceout uses.

Functions

clamp(→ float)

value held inside [low, high].

Module Contents

spacr.qt.fractal_defaults.clamp(value: float, low: float, high: float) → float[source]

value held inside [low, high].

Parameters:
  • value – the number to clamp.

  • low – lower bound, returned when value is below it.

  • high – upper bound, returned when value is above it.