BLI: Add "identity" constructor to float4x4 type

This commit is contained in:
Hans Goudey 2021-03-22 11:52:44 -04:00
parent 9baf39c8da
commit 2d1120c171
1 changed files with 7 additions and 0 deletions

View File

@ -45,6 +45,13 @@ struct float4x4 {
return mat;
}
static float4x4 identity()
{
float4x4 mat;
unit_m4(mat.values);
return mat;
}
operator float *()
{
return &values[0][0];