18 lines
No EOL
650 B
Text
18 lines
No EOL
650 B
Text
/*
|
|
contributors: Patricio Gonzalez Vivo
|
|
description: given a 3x3 returns a 4x4
|
|
use: <matrix<float, 4, 4>> tomatrix<float, 4, 4>(<matrix<float, 3, 3>> m)
|
|
license:
|
|
- Copyright (c) 2021 Patricio Gonzalez Vivo under Prosperity License - https://prosperitylicense.com/versions/3.0.0
|
|
- Copyright (c) 2021 Patricio Gonzalez Vivo under Patron License - https://lygia.xyz/license
|
|
*/
|
|
|
|
#ifndef FNC_TOMAT4
|
|
#define FNC_TOMAT4
|
|
matrix<float, 4, 4> tomat4(matrix<float, 3, 3> m) {
|
|
return matrix<float, 4, 4>(float4(m[0], 0.0),
|
|
float4(m[1], 0.0),
|
|
float4(m[2], 0.0),
|
|
float4(0.0, 0.0, 0.0, 1.0) );
|
|
}
|
|
#endif |