The C language return value cannot be used to directly write arrays.
# Ifndef _ VMATH_H # define _ VMATH_H # ifdef _ cplusplusextern "C" {# endiftypedef float Matrix44f [16]; Matrix44f translate (float x, float y, float z ); round scale (float x, float y, float z); Matrix44f rotateX (float radian); Round rotateY (float radian); Round rotateZ (float radian); Matrix44f rotateXYZ (float radian, float x, float y, float z); Matrix44f perspectiveFrustum (float left, float right, float top, float bottom, float near, float far ); // Perspective Projection Matrix44f orthoPerspect (float left, float right, float top, float bottom, float near, float far); // orthogonal projection # ifdef _ cplusplus} # endif
The compiler reports an error in the preceding writing, which can be changed to the pointer type.
Float * translate (float x, float y, float z );