With this function you can know the area of a given Triangle.
float AreaOfTriangle(float w, float h) { return (w * h) / 2; } //For best pratices, it's better to have your code readable
float AreaOfTriangle(float w, float h) {return (w * h) / 2;} //Get one-lined- float AreaOfTriangle(float w, float h) {
- return (w * h) / 2;
- } //For best pratices, it's better to have your code readable