fix: fix linux build issue
- use std::cos and std::sin instead of std::cosf and std::sinf. it seems that some linux environment do not have these 2 functions in std namespace.
This commit is contained in:
parent
c18ff8f2e3
commit
0bf0519c4c
@ -444,7 +444,7 @@ namespace LibCmo::VxMath {
|
|||||||
}
|
}
|
||||||
void VxMatrix::Perspective(CKFLOAT Fov, CKFLOAT Aspect, CKFLOAT Near_plane, CKFLOAT Far_plane) {
|
void VxMatrix::Perspective(CKFLOAT Fov, CKFLOAT Aspect, CKFLOAT Near_plane, CKFLOAT Far_plane) {
|
||||||
Clear();
|
Clear();
|
||||||
m_Data[0][0] = std::cosf(Fov * 0.5f) / std::sinf(Fov * 0.5f);
|
m_Data[0][0] = std::cos(Fov * 0.5f) / std::sin(Fov * 0.5f);
|
||||||
m_Data[1][1] = m_Data[0][0] * Aspect;
|
m_Data[1][1] = m_Data[0][0] * Aspect;
|
||||||
m_Data[2][2] = Far_plane / (Far_plane - Near_plane);
|
m_Data[2][2] = Far_plane / (Far_plane - Near_plane);
|
||||||
m_Data[3][2] = -m_Data[2][2] * Near_plane;
|
m_Data[3][2] = -m_Data[2][2] * Near_plane;
|
||||||
|
Loading…
Reference in New Issue
Block a user