Moved quadratic function to utilities file

This commit is contained in:
Chish36 2025-07-29 12:28:20 +01:00 committed by Julian Stirling
parent d494761cbb
commit 38906c8fff
2 changed files with 12 additions and 11 deletions

View file

@ -327,3 +327,14 @@ def _get_version_from_toml(toml_path: str) -> str:
except (IOError, ValueError, KeyError):
LOGGER.error("Problem opening pyproject.toml")
return "Undefined"
def quadratic(x, a, b, c):
"""Quadratic function. Used for predicting z.
:param x: The points at which to evaluate the quadratic.
:param a: The coefficient of x^2.
:param b: The coefficient of x.
:param c: The constant coefficient.
:return: The quadratic, evaluated at each point in ``x``
"""
return a * x**2 + b * x + c