------------------------ PyUtilConvertPointData ------------------------ Convert a Python object to a double and store it into the given position in an array.
| 261 | // position in an array. |
| 262 | // |
| 263 | bool PyUtilConvertPointData(PyObject* data, int index, std::string& msg, double point[3]) |
| 264 | { |
| 265 | if (!PyFloat_Check(data) && !PyLong_Check(data)) { |
| 266 | msg = "data at " + std::to_string(index) + " in the list is not a float."; |
| 267 | return false; |
| 268 | } |
| 269 | point[index] = PyFloat_AsDouble(data); |
| 270 | return true; |
| 271 | } |
| 272 | |
| 273 | bool PyUtilConvertPointData(PyObject* data, int index, std::string& msg, int point[3]) |
| 274 | { |
no outgoing calls
no test coverage detected