Blender
V3.3
|
#include <Python.h>
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "py_capi_utils.h"
#include "bl_math_py_api.h"
Go to the source code of this file.
Functions | |
Module Doc String | |
PyDoc_STRVAR (M_bl_math_doc, "Miscellaneous math utilities module") | |
Python Functions | |
PyDoc_STRVAR (py_bl_math_clamp_doc, ".. function:: clamp(value, min=0, max=1)\n" "\n" " Clamps the float value between minimum and maximum. To avoid\n" " confusion, any call must use either one or all three arguments.\n" "\n" " :arg value: The value to clamp.\n" " :type value: float\n" " :arg min: The minimum value, defaults to 0.\n" " :type min: float\n" " :arg max: The maximum value, defaults to 1.\n" " :type max: float\n" " :return: The clamped value.\n" " :rtype: float\n") | |
static PyObject * | py_bl_math_clamp (PyObject *UNUSED(self), PyObject *args) |
PyDoc_STRVAR (py_bl_math_lerp_doc, ".. function:: lerp(from_value, to_value, factor)\n" "\n" " Linearly interpolate between two float values based on factor.\n" "\n" " :arg from_value: The value to return when factor is 0.\n" " :type from_value: float\n" " :arg to_value: The value to return when factor is 1.\n" " :type to_value: float\n" " :arg factor: The interpolation value, normally in [0.0, 1.0].\n" " :type factor: float\n" " :return: The interpolated value.\n" " :rtype: float\n") | |
static PyObject * | py_bl_math_lerp (PyObject *UNUSED(self), PyObject *args) |
PyDoc_STRVAR (py_bl_math_smoothstep_doc, ".. function:: smoothstep(from_value, to_value, value)\n" "\n" " Performs smooth interpolation between 0 and 1 as value changes between from and " "to values.\n" " Outside the range the function returns the same value as the nearest edge.\n" "\n" " :arg from_value: The edge value where the result is 0.\n" " :type from_value: float\n" " :arg to_value: The edge value where the result is 1.\n" " :type to_value: float\n" " :arg factor: The interpolation value.\n" " :type factor: float\n" " :return: The interpolated value in [0.0, 1.0].\n" " :rtype: float\n") | |
static PyObject * | py_bl_math_smoothstep (PyObject *UNUSED(self), PyObject *args) |
Module Definition | |
static PyMethodDef | M_bl_math_methods [] |
static struct PyModuleDef | M_bl_math_module_def |
PyMODINIT_FUNC | BPyInit_bl_math (void) |
This file defines the 'bl_math' module, a module for math utilities.
Definition in file bl_math_py_api.c.
PyMODINIT_FUNC BPyInit_bl_math | ( | void | ) |
Definition at line 142 of file bl_math_py_api.c.
References M_bl_math_module_def.
|
static |
Definition at line 45 of file bl_math_py_api.c.
|
static |
Definition at line 78 of file bl_math_py_api.c.
References Freestyle::a, usdtokens::b(), NULL, and x.
|
static |
Definition at line 103 of file bl_math_py_api.c.
References Freestyle::a, usdtokens::b(), CLAMP, NULL, t, and x.
PyDoc_STRVAR | ( | M_bl_math_doc | , |
"Miscellaneous math utilities module" | |||
) |
PyDoc_STRVAR | ( | py_bl_math_clamp_doc | , |
".. function:: clamp(value, min=0, max=1)\n" "\n" " Clamps the float value between minimum and maximum. To avoid\n" " | confusion, | ||
any call must use either one or all three arguments.\n" "\n" " :arg value:The value to clamp.\n" " :type value:float\n" " :arg min:The minimum | value, | ||
defaults to 0.\n" " :type min:float\n" " :arg max:The maximum | value, | ||
defaults to 1.\n" " :type max:float\n" " :return:The clamped value.\n" " :rtype:float\n" | |||
) |
PyDoc_STRVAR | ( | py_bl_math_lerp_doc | , |
".. function:: lerp(from_value, to_value, factor)\n" "\n" " Linearly interpolate between two float values based on factor.\n" "\n" " :arg from_value: The value to return when factor is 0.\n" " :type from_value: float\n" " :arg to_value: The value to return when factor is 1.\n" " :type to_value: float\n" " :arg factor: The interpolation | value, | ||
normally in .\n" " :type factor:float\n" " :return:The interpolated value.\n" " :rtype:float\n" | [0.0, 1.0] | ||
) |
PyDoc_STRVAR | ( | py_bl_math_smoothstep_doc | , |
".. function:: smoothstep(from_value, to_value, value)\n" "\n" " Performs smooth interpolation between 0 and 1 as value changes between from and " "to values.\n" " Outside the range the function returns the same value as the nearest edge.\n" "\n" " :arg from_value: The edge value where the result is 0.\n" " :type from_value: float\n" " :arg to_value: The edge value where the result is 1.\n" " :type to_value: float\n" " :arg factor: The interpolation value.\n" " :type factor: float\n" " :return: The interpolated value in .\n" " :rtype: float\n" | [0.0, 1.0] | ||
) |
|
static |
Definition at line 123 of file bl_math_py_api.c.
|
static |
Definition at line 123 of file bl_math_py_api.c.
Referenced by BPyInit_bl_math().