Skip to content

Commit 239c053

Browse files
authored
Using custom dot implementation and fixing matmul (#284)
* Fix project setup * Using custom dot that supports integer vectors * Fixed matmul implementation for vectors
1 parent 40a2ecd commit 239c053

File tree

11 files changed

+239
-15
lines changed

11 files changed

+239
-15
lines changed

PyGLM_lib/PyGLM/functions/detail/func_geometric.h

Lines changed: 143 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,154 @@ PyDoc_STRVAR(distance_docstr,
2828
PyGLM_MAKE_GLM_FUNC_NN_VV__tfF(distance)
2929

3030
PyDoc_STRVAR(dot_docstr,
31-
"dot(x: float, y: float) -> float\n"
31+
"dot(x: number, y: number) -> float\n"
3232
" Returns the dot product of `x` and `y`, i.e., `result = x * y`.\n"
33-
"dot(x: vecN, y: vecN) -> float\n"
33+
"dot(x: vecN, y: vecN) -> number\n"
3434
" Returns the dot product of `x` and `y`, i.e., `result = x[0] * y[0] + x[1] * y[1] + ...`\n"
3535
"dot(x: quat, y: quat) -> float\n"
3636
" Returns dot product of `x` and `y`, i.e., `x[0] * y[0] + x[1] * y[1] + ...`"
3737
);
38-
PyGLM_MAKE_GLM_FUNC_NN_VV_QQ__tfF(dot)
38+
39+
static PyObject*
40+
dot_(PyObject*, PyObject* args) {
41+
PyObject *arg1, *arg2;
42+
PyGLM_Arg_Unpack_2O(args, "dot", arg1, arg2);
43+
if (PyGLM_Number_Check(arg1) && PyGLM_Number_Check(arg2)) {
44+
return pack(glm::custom::dot(PyGLM_Number_FromPyObject<double>(arg1), PyGLM_Number_FromPyObject<double>(arg2)));
45+
}
46+
PyGLM_PTI_Init0(arg1, PyGLM_T_VEC | PyGLM_T_QUA | PyGLM_SHAPE_ALL | PyGLM_DT_FD | PyGLM_DT_I);
47+
PyGLM_PTI_Init1(arg2, PyGLM_T_VEC | PyGLM_T_QUA | PyGLM_SHAPE_ALL | PyGLM_DT_FD | PyGLM_DT_I);
48+
if (PyGLM_PTI_IsVec(0)) {
49+
if (PyGLM_Vec_PTI_Check0(1, float, arg1) && PyGLM_Vec_PTI_Check1(1, float, arg2)) {
50+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(1, float, arg1), PyGLM_Vec_PTI_Get1(1, float, arg2)));
51+
}
52+
if (PyGLM_Vec_PTI_Check0(1, double, arg1) && PyGLM_Vec_PTI_Check1(1, double, arg2)) {
53+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(1, double, arg1), PyGLM_Vec_PTI_Get1(1, double, arg2)));
54+
}
55+
if (PyGLM_Vec_PTI_Check0(1, int32, arg1) && PyGLM_Vec_PTI_Check1(1, int32, arg2)) {
56+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(1, int32, arg1), PyGLM_Vec_PTI_Get1(1, int32, arg2)));
57+
}
58+
if (PyGLM_Vec_PTI_Check0(1, uint32, arg1) && PyGLM_Vec_PTI_Check1(1, uint32, arg2)) {
59+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(1, uint32, arg1), PyGLM_Vec_PTI_Get1(1, uint32, arg2)));
60+
}
61+
if (PyGLM_Vec_PTI_Check0(1, int64, arg1) && PyGLM_Vec_PTI_Check1(1, int64, arg2)) {
62+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(1, int64, arg1), PyGLM_Vec_PTI_Get1(1, int64, arg2)));
63+
}
64+
if (PyGLM_Vec_PTI_Check0(1, uint64, arg1) && PyGLM_Vec_PTI_Check1(1, uint64, arg2)) {
65+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(1, uint64, arg1), PyGLM_Vec_PTI_Get1(1, uint64, arg2)));
66+
}
67+
if (PyGLM_Vec_PTI_Check0(1, int16, arg1) && PyGLM_Vec_PTI_Check1(1, int16, arg2)) {
68+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(1, int16, arg1), PyGLM_Vec_PTI_Get1(1, int16, arg2)));
69+
}
70+
if (PyGLM_Vec_PTI_Check0(1, uint16, arg1) && PyGLM_Vec_PTI_Check1(1, uint16, arg2)) {
71+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(1, uint16, arg1), PyGLM_Vec_PTI_Get1(1, uint16, arg2)));
72+
}
73+
if (PyGLM_Vec_PTI_Check0(1, int8, arg1) && PyGLM_Vec_PTI_Check1(1, int8, arg2)) {
74+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(1, int8, arg1), PyGLM_Vec_PTI_Get1(1, int8, arg2)));
75+
}
76+
if (PyGLM_Vec_PTI_Check0(1, uint8, arg1) && PyGLM_Vec_PTI_Check1(1, uint8, arg2)) {
77+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(1, uint8, arg1), PyGLM_Vec_PTI_Get1(1, uint8, arg2)));
78+
}
79+
if (PyGLM_Vec_PTI_Check0(2, float, arg1) && PyGLM_Vec_PTI_Check1(2, float, arg2)) {
80+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(2, float, arg1), PyGLM_Vec_PTI_Get1(2, float, arg2)));
81+
}
82+
if (PyGLM_Vec_PTI_Check0(2, double, arg1) && PyGLM_Vec_PTI_Check1(2, double, arg2)) {
83+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(2, double, arg1), PyGLM_Vec_PTI_Get1(2, double, arg2)));
84+
}
85+
if (PyGLM_Vec_PTI_Check0(2, int32, arg1) && PyGLM_Vec_PTI_Check1(2, int32, arg2)) {
86+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(2, int32, arg1), PyGLM_Vec_PTI_Get1(2, int32, arg2)));
87+
}
88+
if (PyGLM_Vec_PTI_Check0(2, uint32, arg1) && PyGLM_Vec_PTI_Check1(2, uint32, arg2)) {
89+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(2, uint32, arg1), PyGLM_Vec_PTI_Get1(2, uint32, arg2)));
90+
}
91+
if (PyGLM_Vec_PTI_Check0(2, int64, arg1) && PyGLM_Vec_PTI_Check1(2, int64, arg2)) {
92+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(2, int64, arg1), PyGLM_Vec_PTI_Get1(2, int64, arg2)));
93+
}
94+
if (PyGLM_Vec_PTI_Check0(2, uint64, arg1) && PyGLM_Vec_PTI_Check1(2, uint64, arg2)) {
95+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(2, uint64, arg1), PyGLM_Vec_PTI_Get1(2, uint64, arg2)));
96+
}
97+
if (PyGLM_Vec_PTI_Check0(2, int16, arg1) && PyGLM_Vec_PTI_Check1(2, int16, arg2)) {
98+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(2, int16, arg1), PyGLM_Vec_PTI_Get1(2, int16, arg2)));
99+
}
100+
if (PyGLM_Vec_PTI_Check0(2, uint16, arg1) && PyGLM_Vec_PTI_Check1(2, uint16, arg2)) {
101+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(2, uint16, arg1), PyGLM_Vec_PTI_Get1(2, uint16, arg2)));
102+
}
103+
if (PyGLM_Vec_PTI_Check0(2, int8, arg1) && PyGLM_Vec_PTI_Check1(2, int8, arg2)) {
104+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(2, int8, arg1), PyGLM_Vec_PTI_Get1(2, int8, arg2)));
105+
}
106+
if (PyGLM_Vec_PTI_Check0(2, uint8, arg1) && PyGLM_Vec_PTI_Check1(2, uint8, arg2)) {
107+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(2, uint8, arg1), PyGLM_Vec_PTI_Get1(2, uint8, arg2)));
108+
}
109+
if (PyGLM_Vec_PTI_Check0(3, float, arg1) && PyGLM_Vec_PTI_Check1(3, float, arg2)) {
110+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(3, float, arg1), PyGLM_Vec_PTI_Get1(3, float, arg2)));
111+
}
112+
if (PyGLM_Vec_PTI_Check0(3, double, arg1) && PyGLM_Vec_PTI_Check1(3, double, arg2)) {
113+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(3, double, arg1), PyGLM_Vec_PTI_Get1(3, double, arg2)));
114+
}
115+
if (PyGLM_Vec_PTI_Check0(3, int32, arg1) && PyGLM_Vec_PTI_Check1(3, int32, arg2)) {
116+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(3, int32, arg1), PyGLM_Vec_PTI_Get1(3, int32, arg2)));
117+
}
118+
if (PyGLM_Vec_PTI_Check0(3, uint32, arg1) && PyGLM_Vec_PTI_Check1(3, uint32, arg2)) {
119+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(3, uint32, arg1), PyGLM_Vec_PTI_Get1(3, uint32, arg2)));
120+
}
121+
if (PyGLM_Vec_PTI_Check0(3, int64, arg1) && PyGLM_Vec_PTI_Check1(3, int64, arg2)) {
122+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(3, int64, arg1), PyGLM_Vec_PTI_Get1(3, int64, arg2)));
123+
}
124+
if (PyGLM_Vec_PTI_Check0(3, uint64, arg1) && PyGLM_Vec_PTI_Check1(3, uint64, arg2)) {
125+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(3, uint64, arg1), PyGLM_Vec_PTI_Get1(3, uint64, arg2)));
126+
}
127+
if (PyGLM_Vec_PTI_Check0(3, int16, arg1) && PyGLM_Vec_PTI_Check1(3, int16, arg2)) {
128+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(3, int16, arg1), PyGLM_Vec_PTI_Get1(3, int16, arg2)));
129+
}
130+
if (PyGLM_Vec_PTI_Check0(3, uint16, arg1) && PyGLM_Vec_PTI_Check1(3, uint16, arg2)) {
131+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(3, uint16, arg1), PyGLM_Vec_PTI_Get1(3, uint16, arg2)));
132+
}
133+
if (PyGLM_Vec_PTI_Check0(3, int8, arg1) && PyGLM_Vec_PTI_Check1(3, int8, arg2)) {
134+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(3, int8, arg1), PyGLM_Vec_PTI_Get1(3, int8, arg2)));
135+
}
136+
if (PyGLM_Vec_PTI_Check0(3, uint8, arg1) && PyGLM_Vec_PTI_Check1(3, uint8, arg2)) {
137+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(3, uint8, arg1), PyGLM_Vec_PTI_Get1(3, uint8, arg2)));
138+
}
139+
if (PyGLM_Vec_PTI_Check0(4, float, arg1) && PyGLM_Vec_PTI_Check1(4, float, arg2)) {
140+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(4, float, arg1), PyGLM_Vec_PTI_Get1(4, float, arg2)));
141+
}
142+
if (PyGLM_Vec_PTI_Check0(4, double, arg1) && PyGLM_Vec_PTI_Check1(4, double, arg2)) {
143+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(4, double, arg1), PyGLM_Vec_PTI_Get1(4, double, arg2)));
144+
}
145+
if (PyGLM_Vec_PTI_Check0(4, int32, arg1) && PyGLM_Vec_PTI_Check1(4, int32, arg2)) {
146+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(4, int32, arg1), PyGLM_Vec_PTI_Get1(4, int32, arg2)));
147+
}
148+
if (PyGLM_Vec_PTI_Check0(4, uint32, arg1) && PyGLM_Vec_PTI_Check1(4, uint32, arg2)) {
149+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(4, uint32, arg1), PyGLM_Vec_PTI_Get1(4, uint32, arg2)));
150+
}
151+
if (PyGLM_Vec_PTI_Check0(4, int64, arg1) && PyGLM_Vec_PTI_Check1(4, int64, arg2)) {
152+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(4, int64, arg1), PyGLM_Vec_PTI_Get1(4, int64, arg2)));
153+
}
154+
if (PyGLM_Vec_PTI_Check0(4, uint64, arg1) && PyGLM_Vec_PTI_Check1(4, uint64, arg2)) {
155+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(4, uint64, arg1), PyGLM_Vec_PTI_Get1(4, uint64, arg2)));
156+
}
157+
if (PyGLM_Vec_PTI_Check0(4, int16, arg1) && PyGLM_Vec_PTI_Check1(4, int16, arg2)) {
158+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(4, int16, arg1), PyGLM_Vec_PTI_Get1(4, int16, arg2)));
159+
}
160+
if (PyGLM_Vec_PTI_Check0(4, uint16, arg1) && PyGLM_Vec_PTI_Check1(4, uint16, arg2)) {
161+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(4, uint16, arg1), PyGLM_Vec_PTI_Get1(4, uint16, arg2)));
162+
}
163+
if (PyGLM_Vec_PTI_Check0(4, int8, arg1) && PyGLM_Vec_PTI_Check1(4, int8, arg2)) {
164+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(4, int8, arg1), PyGLM_Vec_PTI_Get1(4, int8, arg2)));
165+
}
166+
if (PyGLM_Vec_PTI_Check0(4, uint8, arg1) && PyGLM_Vec_PTI_Check1(4, uint8, arg2)) {
167+
return pack(glm::custom::dot(PyGLM_Vec_PTI_Get0(4, uint8, arg1), PyGLM_Vec_PTI_Get1(4, uint8, arg2)));
168+
}
169+
}
170+
if (PyGLM_Qua_PTI_Check0(float, arg1) && PyGLM_Qua_PTI_Check1(float, arg2)) {
171+
return pack(glm::custom::dot(PyGLM_Qua_PTI_Get0(float, arg1), PyGLM_Qua_PTI_Get1(float, arg2)));
172+
}
173+
if (PyGLM_Qua_PTI_Check0(double, arg1) && PyGLM_Qua_PTI_Check1(double, arg2)) {
174+
return pack(glm::custom::dot(PyGLM_Qua_PTI_Get0(double, arg1), PyGLM_Qua_PTI_Get1(double, arg2)));
175+
}
176+
PyGLM_TYPEERROR_2O("invalid argument type(s) for dot(): ", arg1, arg2);
177+
return NULL;
178+
}
39179

40180
PyDoc_STRVAR(cross_docstr,
41181
"cross(x: vec3, y: vec3) -> vec3\n"

PyGLM_lib/PyGLM/imports.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
#include <glm/glm.hpp>
2222

23+
#include "internal_functions/glm_customizations.h"
24+
2325
#include <glm/gtc/quaternion.hpp>
2426
#include <glm/gtc/matrix_integer.hpp>
2527
#include <glm/gtx/hash.hpp>
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#pragma once
2+
3+
#include "../compiler_setup.h"
4+
5+
namespace glm {
6+
namespace custom {
7+
template<typename T>
8+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR T dot(T x, T y)
9+
{
10+
return x * y;
11+
}
12+
13+
template<length_t L, typename T, qualifier Q>
14+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR T dot(vec<L, T, Q> const& x, vec<L, T, Q> const& y)
15+
{
16+
return detail::compute_dot<vec<L, T, Q>, T, detail::is_aligned<Q>::value>::call(x, y);
17+
}
18+
19+
template<typename T, qualifier Q>
20+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR T dot(qua<T, Q> const& x, qua<T, Q> const& y)
21+
{
22+
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'dot' accepts only floating-point inputs");
23+
return detail::compute_dot<qua<T, Q>, T, detail::is_aligned<Q>::value>::call(x, y);
24+
}
25+
26+
template<int C, int R, typename T, qualifier Q>
27+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<C, R, T, Q>::col_type mat_mul
28+
(
29+
mat<C, R, T, Q> const& m,
30+
typename mat<C, R, T, Q>::row_type const& v
31+
)
32+
{
33+
return m * v;
34+
}
35+
36+
template<int C, int R, typename T, qualifier Q>
37+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<C, R, T, Q>::row_type mat_mul
38+
(
39+
typename mat<C, R, T, Q>::col_type const& v,
40+
mat<C, R, T, Q> const& m
41+
)
42+
{
43+
return v * m;
44+
}
45+
46+
template<typename T, qualifier Q>
47+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<3, 3, T, Q>::row_type mat_mul(typename mat<3, 3, T, Q>::col_type const& v, mat<3, 3, T, Q> const& m)
48+
{
49+
return typename mat<3, 3, T, Q>::row_type(
50+
glm::custom::dot(m[0], v),
51+
glm::custom::dot(m[1], v),
52+
glm::custom::dot(m[2], v));
53+
}
54+
55+
template<typename T, qualifier Q>
56+
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename mat<4, 4, T, Q>::row_type mat_mul
57+
(
58+
typename mat<4, 4, T, Q>::col_type const& v,
59+
mat<4, 4, T, Q> const& m
60+
)
61+
{
62+
return typename mat<4, 4, T, Q>::row_type(
63+
glm::custom::dot(m[0], v),
64+
glm::custom::dot(m[1], v),
65+
glm::custom::dot(m[2], v),
66+
glm::custom::dot(m[3], v));
67+
}
68+
}
69+
}

PyGLM_lib/PyGLM/type_methods/mat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ mat_mul(PyObject *obj1, PyObject *obj2)
13751375
if (PyGLM_Vec_PTI_Check0(R, T, obj1)) { // obj1 is a col_type
13761376
glm::vec<R, T> o = PyGLM_Vec_PTI_Get0(R, T, obj1);
13771377

1378-
return pack_vec(o * ((mat<C, R, T>*)obj2)->super_type);
1378+
return pack_vec(glm::custom::mat_mul(o, ((mat<C, R, T>*)obj2)->super_type));
13791379
}
13801380

13811381
if (!PyGLM_Mat_PTI_Check0(C, R, T, obj1)) { // obj1 can't be interpreted as mat<C, R, T>
@@ -1394,7 +1394,7 @@ mat_mul(PyObject *obj1, PyObject *obj2)
13941394
if (PyGLM_Vec_PTI_Check0(C, T, obj2)) { // obj2 is a row_type
13951395
glm::vec<C, T> o2 = PyGLM_Vec_PTI_Get0(C, T, obj2);
13961396

1397-
return pack_vec(o * o2);
1397+
return pack_vec(glm::custom::mat_mul(o, o2));
13981398
}
13991399

14001400
if (PyGLM_Mat_PTI_Check0(2, C, T, obj2)) {

PyGLM_lib/PyGLM/type_methods/vec.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,10 +1166,19 @@ vec_pow(PyObject * obj1, PyObject * obj2, PyObject * obj3) {
11661166
return pack_vec<L, T>(glm::mod(glm::pow(o, o2), o3));
11671167
}
11681168

1169+
static PyObject* dot_(PyObject*, PyObject* args);
1170+
11691171
static PyObject*
11701172
vec_matmul(PyObject* obj1, PyObject* obj2)
11711173
{
1172-
PyObject* out = PyNumber_Multiply(obj1, obj2);
1174+
PyObject* args = PyTuple_New(2);
1175+
PyTuple_SET_ITEM(args, 0, PyGLM_INCREF(obj1));
1176+
PyTuple_SET_ITEM(args, 1, PyGLM_INCREF(obj2));
1177+
1178+
PyObject* out = dot_(NULL, args);
1179+
1180+
Py_DECREF(args);
1181+
11731182
if (out == NULL) {
11741183
PyGLM_TYPEERROR_2O("unsupported operand type(s) for @: ", obj1, obj2);
11751184
}

vs-project/PyGLM build/PyGLM build.vcxproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
</ImportGroup>
7171
<PropertyGroup Label="UserMacros" />
7272
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
73-
<TargetName>glm</TargetName>
73+
<TargetName>glm_d</TargetName>
7474
<TargetExt>.pyd</TargetExt>
7575
</PropertyGroup>
7676
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -80,7 +80,7 @@
8080
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
8181
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
8282
<IntDir>$(Platform)\$(Configuration)\</IntDir>
83-
<TargetName>glm</TargetName>
83+
<TargetName>glm_d</TargetName>
8484
<TargetExt>.pyd</TargetExt>
8585
</PropertyGroup>
8686
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -117,7 +117,7 @@
117117
</ClCompile>
118118
<Link>
119119
<AdditionalLibraryDirectories>C:\Python39\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
120-
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
120+
<AdditionalDependencies>python39_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
121121
</Link>
122122
</ItemDefinitionGroup>
123123
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -206,6 +206,7 @@
206206
<ClInclude Include="..\..\PyGLM_lib\PyGLM\internal_functions\all.h" />
207207
<ClInclude Include="..\..\PyGLM_lib\PyGLM\internal_functions\ctypes_pointers.h" />
208208
<ClInclude Include="..\..\PyGLM_lib\PyGLM\internal_functions\error_functions.h" />
209+
<ClInclude Include="..\..\PyGLM_lib\PyGLM\internal_functions\glm_customizations.h" />
209210
<ClInclude Include="..\..\PyGLM_lib\PyGLM\internal_functions\helper_macros.h" />
210211
<ClInclude Include="..\..\PyGLM_lib\PyGLM\internal_functions\number_functions.h" />
211212
<ClInclude Include="..\..\PyGLM_lib\PyGLM\internal_functions\packers.h" />

vs-project/PyGLM build/PyGLM build.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,5 +734,8 @@
734734
<ClInclude Include="..\..\PyGLM_lib\version.h">
735735
<Filter>Headerdateien</Filter>
736736
</ClInclude>
737+
<ClInclude Include="..\..\PyGLM_lib\PyGLM\internal_functions\glm_customizations.h">
738+
<Filter>Headerdateien\PyGLM\internal_functions</Filter>
739+
</ClInclude>
737740
</ItemGroup>
738741
</Project>

vs-project/PyGLM test.pyproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<Compile Include="PyGLM_run.py" />
3232
</ItemGroup>
3333
<ItemGroup>
34-
<ProjectReference Include="..\PyGLM build\PyGLM build.vcxproj">
34+
<ProjectReference Include="PyGLM build\PyGLM build.vcxproj">
3535
<Name>PyGLM build</Name>
3636
<Project>{9908a257-6824-4543-b7e4-acfd9f40ad85}</Project>
3737
<Private>True</Private>

vs-project/PyGLM.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VisualStudioVersion = 17.10.34916.146
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "PyGLM test", "PyGLM test.pyproj", "{4DB02B00-448E-49AC-BBDE-4E06AA14F15D}"
77
EndProject
8-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PyGLM build", "..\PyGLM build\PyGLM build.vcxproj", "{9908A257-6824-4543-B7E4-ACFD9F40AD85}"
8+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PyGLM build", "PyGLM build\PyGLM build.vcxproj", "{9908A257-6824-4543-B7E4-ACFD9F40AD85}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution

wiki/function-reference/detail/func_geometric.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ These operate on vectors as vectors, not component\-wise\.
3030
&emsp;&emsp;Returns the distance between ``` p0 ``` and ``` p1 ```, i\.e\., ``` length(p0 - p1) ```\.
3131

3232
### dot\(\) function
33-
#### <code>glm.<code>**dot**(**x**: *float*, **y**: *float*) -\> *float*</code></code>
33+
#### <code>glm.<code>**dot**(**x**: *number*, **y**: *number*) -\> *float*</code></code>
3434
&emsp;&emsp;Returns the dot product of ``` x ``` and ``` y ```, i\.e\., ``` result = x * y ```\.
3535

36-
#### <code>glm.<code>**dot**(**x**: *vecN*, **y**: *vecN*) -\> *float*</code></code>
36+
#### <code>glm.<code>**dot**(**x**: *vecN*, **y**: *vecN*) -\> *number*</code></code>
3737
&emsp;&emsp;Returns the dot product of ``` x ``` and ``` y ```, i\.e\., ``` result = x[0] * y[0] + x[1] * y[1] + ... ```
3838

3939
#### <code>glm.<code>**dot**(**x**: *quat*, **y**: *quat*) -\> *float*</code></code>

0 commit comments

Comments
 (0)