<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Check whether a triangle is a standard equilateral triangle</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="https://rpkg.net/assets/examples.css" />
</head><body>

<table width="100%" summary="page for is.std.eq.tri"><tr><td>is.std.eq.tri</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Check whether a triangle is a standard equilateral triangle</h2>

<h3>Description</h3>

<p>Checks whether the triangle, <code>tri</code>,
is the standard equilateral triangle
<i>T_e=T((0,0),(1,0),(1/2,&radic;{3}/2))</i> or not.
</p>


<h3>Usage</h3>

<pre>
is.std.eq.tri(tri)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>tri</code></td>
<td>
<p>A <i>3 \times 2</i> matrix with each row
representing a vertex of the triangle.</p>
</td></tr>
</table>


<h3>Value</h3>

<p><code>TRUE</code> if <code>tri</code> is a standard equilateral triangle,
else <code>FALSE</code>.
</p>


<h3>Author(s)</h3>

<p>Elvan Ceyhan
</p>


<h3>Examples</h3>

<pre>

A&lt;-c(0,0); B&lt;-c(1,0); C&lt;-c(1/2,sqrt(3)/2);
Te&lt;-rbind(A,B,C)  #try adding +10^(-16) to each vertex
is.std.eq.tri(Te)

is.std.eq.tri(rbind(B,C,A))

Tr&lt;-rbind(A,B,-C)
is.std.eq.tri(Tr)

A&lt;-c(1,1); B&lt;-c(2,0); C&lt;-c(1.5,2);
Tr&lt;-rbind(A,B,C);
is.std.eq.tri(Tr)


</pre>


</body></html>
