17 lines
606 B
Text
17 lines
606 B
Text
/*
|
|
contributors: Patricio Gonzalez Vivo
|
|
description: returns a 3x3 rotation matrix
|
|
use: <matrix<float, 3, 3>> rotate3dX(<float> radians)
|
|
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_ROTATE3DX
|
|
#define FNC_ROTATE3DX
|
|
matrix<float, 3, 3> rotate3dX(const float r){
|
|
return matrix<float, 3, 3>(float3(1.0,0.0,0.0),
|
|
float3(0.0,cos(r),-sin(r)),
|
|
float3(0.0,sin(r),cos(r)));
|
|
}
|
|
#endif
|