<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Regular (geoml.Geoml.Polygon.Convex.Regular)</title><link rel="stylesheet" href="../../../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.1.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> â€“ <a href="../../../../index.html">geoml</a> &#x00BB; <a href="../../../index.html">Geoml</a> &#x00BB; <a href="../../index.html">Polygon</a> &#x00BB; <a href="../index.html">Convex</a> &#x00BB; Regular</nav><header class="odoc-preamble"><h1>Module <code><span>Convex.Regular</span></code></h1><p>Module for Regular polygons</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type" id="type-t" class="anchored"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = <span class="keyword">private</span> </span><span>{</span></code><table><tr id="type-t.center" class="anchored"><td class="def record field"><a href="#type-t.center" class="anchor"></a><code><span>center : <a href="../../../Point/index.html#type-t">Point.t</a>;</span></code></td></tr><tr id="type-t.fst" class="anchored"><td class="def record field"><a href="#type-t.fst" class="anchor"></a><code><span>fst : <a href="../../../Point/index.html#type-t">Point.t</a>;</span></code></td></tr><tr id="type-t.snd" class="anchored"><td class="def record field"><a href="#type-t.snd" class="anchor"></a><code><span>snd : <a href="../../../Point/index.html#type-t">Point.t</a>;</span></code></td></tr><tr id="type-t.len" class="anchored"><td class="def record field"><a href="#type-t.len" class="anchor"></a><code><span>len : float;</span></code></td></tr><tr id="type-t.apothem" class="anchored"><td class="def record field"><a href="#type-t.apothem" class="anchor"></a><code><span>apothem : float;</span></code></td><td class="def-doc"><span class="comment-delim">(*</span><p>Distance between the center and the middle of one of the edges</p><span class="comment-delim">*)</span></td></tr><tr id="type-t.edges" class="anchored"><td class="def record field"><a href="#type-t.edges" class="anchor"></a><code><span>edges : int;</span></code></td></tr></table><code><span>}</span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-make" class="anchored"><a href="#val-make" class="anchor"></a><code><span><span class="keyword">val</span> make : <span><a href="../../../Point/index.html#type-t">Point.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../Point/index.html#type-t">Point.t</a> <span class="arrow">&#45;&gt;</span></span> <span>int <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Create a regular polygon from the center, an arbitrary point and the number of edges</p></div></div><div class="odoc-spec"><div class="spec value" id="val-next_point" class="anchored"><a href="#val-next_point" class="anchor"></a><code><span><span class="keyword">val</span> next_point : <span>?nth:int <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../../Point/index.html#type-t">Point.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-fold_stop" class="anchored"><a href="#val-fold_stop" class="anchor"></a><code><span><span class="keyword">val</span> fold_stop : 
  <span><span>( <span><a href="../../../Point/index.html#type-t">Point.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../Point/index.html#type-t">Point.t</a> <span class="arrow">&#45;&gt;</span></span> bool )</span> <span class="arrow">&#45;&gt;</span></span>
  <span><span>( <span>int <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../Point/index.html#type-t">Point.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../Point/index.html#type-t">Point.t</a> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span> )</span> <span class="arrow">&#45;&gt;</span></span>
  <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span>
  <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
  <span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-perimeter" class="anchored"><a href="#val-perimeter" class="anchor"></a><code><span><span class="keyword">val</span> perimeter : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> float</span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-area" class="anchored"><a href="#val-area" class="anchor"></a><code><span><span class="keyword">val</span> area : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> float</span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-to_polygon" class="anchored"><a href="#val-to_polygon" class="anchor"></a><code><span><span class="keyword">val</span> to_polygon : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../index.html#type-polygon">polygon</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-to_randomized_polygon" class="anchored"><a href="#val-to_randomized_polygon" class="anchor"></a><code><span><span class="keyword">val</span> to_randomized_polygon : <span>?minp:int <span class="arrow">&#45;&gt;</span></span> <span>?prob:float <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../index.html#type-polygon">polygon</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-translate" class="anchored"><a href="#val-translate" class="anchor"></a><code><span><span class="keyword">val</span> translate : <span>float <span class="arrow">&#45;&gt;</span></span> <span>float <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-transform" class="anchored"><a href="#val-transform" class="anchor"></a><code><span><span class="keyword">val</span> transform : <span><span class="xref-unresolved">Geoml__Affine.t</span> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-is_square" class="anchored"><a href="#val-is_square" class="anchor"></a><code><span><span class="keyword">val</span> is_square : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-contains" class="anchored"><a href="#val-contains" class="anchor"></a><code><span><span class="keyword">val</span> contains : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../../Point/index.html#type-t">Point.t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-map" class="anchored"><a href="#val-map" class="anchor"></a><code><span><span class="keyword">val</span> map : <span><span>( <span><a href="../../../Point/index.html#type-t">Point.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../../Point/index.html#type-t">Point.t</a> )</span> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div></div></div></body></html>