Skip to content

5. Geometry

Apara Venkat edited this page Mar 19, 2017 · 1 revision

The namespace Geometry contains the following functions

isTriangle

Confirms whether the three sides can form a triangle

Parameters:
int64_t a - The first side int64_t b - The second side int64_t c - The third side

Return value:
bool - true if a, b, c can form a triangle. false otherwise.

Sample usage (after including header file):

bool a = Geometry::isTriangle(3, 4, 5); // true

isRightTriangle

Confirms whether the three sides can form a right triangle

Parameters:
int64_t a - The first side int64_t b - The second side int64_t c - The third side

Return value:
bool - true if a, b, c can form a right triangle. false otherwise.

Sample usage (after including header file):

bool a = Geometry::isRightTriangle(3, 4, 5); // true

Clone this wiki locally