MCPcopy Create free account
hub / github.com/blender/blender / Vector_dot

Function Vector_dot

source/blender/python/mathutils/mathutils_Vector.cc:1110–1128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1108 " :return: The dot product.\n"
1109 " :rtype: float\n");
1110static 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

Callers

nothing calls this directly

Calls 2

dot_vn_vnFunction · 0.85

Tested by

no test coverage detected