| 1108 | " :return: The dot product.\n" |
| 1109 | " :rtype: float\n"); |
| 1110 | static PyObject *Vector_dot(VectorObject *self, PyObject *value) |
| 1111 | { |
| 1112 | float *tvec; |
| 1113 | PyObject *ret; |
| 1114 | |
| 1115 | if (BaseMath_ReadCallback(self) == -1) { |
| 1116 | return nullptr; |
| 1117 | } |
| 1118 | |
| 1119 | if (mathutils_array_parse_alloc( |
| 1120 | &tvec, self->vec_num, value, "Vector.dot(other), invalid 'other' arg") == -1) |
| 1121 | { |
| 1122 | return nullptr; |
| 1123 | } |
| 1124 | |
| 1125 | ret = PyFloat_FromDouble(dot_vn_vn(self->vec, tvec, self->vec_num)); |
| 1126 | PyMem_Free(tvec); |
| 1127 | return ret; |
| 1128 | } |
| 1129 | |
| 1130 | /** \} */ |
| 1131 |
nothing calls this directly
no test coverage detected