Skip to content

Commit 0ee5872

Browse files
committed
Fixed type mismatch in some Matrix4 constructors from Vec3 or Vec4
1 parent 4058b39 commit 0ee5872

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/asl/Matrix4.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright(c) 1999-2022 aslze
1+
// Copyright(c) 1999-2023 aslze
22
// Licensed under the MIT License (http://opensource.org/licenses/MIT)
33

44
#ifndef ASL_MATRIX4_H
@@ -80,7 +80,7 @@ class Matrix4_
8080
/**
8181
Constructs a matrix from 4 3D vectors used as columns, setting the last row as [0 0 0 1]
8282
*/
83-
Matrix4_(const Vec3& v1, const Vec3& v2, const Vec3& v3, const Vec3& v4=Vec3(0,0,0))
83+
Matrix4_(const Vec3_<T>& v1, const Vec3_<T>& v2, const Vec3_<T>& v3, const Vec3_<T>& v4 = Vec3_<T>(0, 0, 0))
8484
{
8585
a[0][0] = v1.x; a[0][1] = v2.x; a[0][2] = v3.x; a[0][3] = v4.x;
8686
a[1][0] = v1.y; a[1][1] = v2.y; a[1][2] = v3.y; a[1][3] = v4.y;
@@ -91,7 +91,7 @@ class Matrix4_
9191
/**
9292
Constructs a matrix from 4 4D vectors used as columns
9393
*/
94-
Matrix4_(const Vec4& v1, const Vec4& v2, const Vec4& v3, const Vec4& v4)
94+
Matrix4_(const Vec4_<T>& v1, const Vec4_<T>& v2, const Vec4_<T>& v3, const Vec4_<T>& v4)
9595
{
9696
a[0][0] = v1.x; a[0][1] = v2.x; a[0][2] = v3.x; a[0][3] = v4.x;
9797
a[1][0] = v1.y; a[1][1] = v2.y; a[1][2] = v3.y; a[1][3] = v4.y;

0 commit comments

Comments
 (0)