MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / perimeter

Method perimeter

utilities/olcUTIL_Geometry2D.h:774–779  ·  view source on GitHub ↗

Get perimeter of triangle

Source from the content-addressed store, hash-verified

772
773 // Get perimeter of triangle
774 inline constexpr T perimeter() const
775 {
776 return line(pos[0], pos[1]).length()
777 + line(pos[1], pos[2]).length()
778 + line(pos[2], pos[0]).length();
779 }
780
781 // Returns side count: 3
782 inline constexpr size_t side_count() const {

Callers

nothing calls this directly

Calls 2

lineClass · 0.85
lengthMethod · 0.80

Tested by

no test coverage detected