MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / createYRotationMatrixTorch

Function createYRotationMatrixTorch

tests/test_slice_mm_bug.cpp:71–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 torch::Tensor createYRotationMatrixTorch(float angle_radians) {
72 float cos_angle = std::cos(angle_radians);
73 float sin_angle = std::sin(angle_radians);
74
75 auto rotMat = torch::eye(4, torch::kFloat32);
76 rotMat[0][0] = cos_angle;
77 rotMat[0][1] = 0.0f;
78 rotMat[0][2] = sin_angle;
79 rotMat[1][0] = 0.0f;
80 rotMat[1][1] = 1.0f;
81 rotMat[1][2] = 0.0f;
82 rotMat[2][0] = -sin_angle;
83 rotMat[2][1] = 0.0f;
84 rotMat[2][2] = cos_angle;
85
86 return rotMat;
87 }
88
89} // namespace
90

Callers 1

TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected