i don't know why i am getting this error but my code do not complies and throws the error
Initializer element is not a compile-time constant here is the code
#include <math.h>
#include <stdio.h>
const float near = 0.1f;
const int fov_angle = 90;
const float far = 1000.0f;
const float width = 800.0f;
const float height = 600.0f;
const float aspect_ratio = width / height;
const float fov = (1.0f / tan(fov_angle / 2.0)); <- error
float projMat[4][4] = {
{fov * aspect_ratio, 0, 0, 0}, <- error
{0, fov, 0, 0},
{0, 0, ((far+near)/(far-near)), 1},
{0, 0, ((2*near*far)/(near-far)), 0}
};