quick and dirty boolean for the glass rod problem

bool isABreakThatFormsATriangle(double length1, double length2, double length3)
{
//* if any section is half, the others connect to form a line
//* if any section is more than half, the others won't connect
//* therefore each section must be less than half
return length1 < 0.5 && length2 < 0.5 && length3 < 0.5;
}
Last edited on
Topic archived. No new replies allowed.