Wolfram Research

Function Repository Resource:

TriangleEdgesQ

Source Notebook

Test if three given lengths make a triangle

Contributed by: Ed Pegg Jr

ResourceFunction["TriangleEdgesQ"][{a,b,c}]

returns True if edge lengths (a,b,c) give a valid triangle.

Examples

Basic Examples

A 3-4-5 triangle exists:

In[1]:=
ResourceFunction["TriangleEdgesQ"][{3, 4, 5}]
Out[1]=

A 3-4-7 triangle does not exist:

In[2]:=
ResourceFunction["TriangleEdgesQ"][{3, 4, 7}]
Out[2]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

License Information