<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Point (geoml.Geoml.Point)</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; Point</nav><header class="odoc-preamble"><h1>Module <code><span>Geoml.Point</span></code></h1><p>Module for 2d points manipulation</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><span>{</span></code><table><tr id="type-t.x" class="anchored"><td class="def record field"><a href="#type-t.x" class="anchor"></a><code><span>x : float;</span></code></td></tr><tr id="type-t.y" class="anchored"><td class="def record field"><a href="#type-t.y" class="anchor"></a><code><span>y : float;</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>float <span class="arrow">&#45;&gt;</span></span> <span>float <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-(%)" class="anchored"><a href="#val-(%)" class="anchor"></a><code><span><span class="keyword">val</span> (%) : <span>float <span class="arrow">&#45;&gt;</span></span> <span>float <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec module" id="module-Tbl" class="anchored"><a href="#module-Tbl" class="anchor"></a><code><span><span class="keyword">module</span> Tbl</span><span> : <span class="xref-unresolved">Stdlib</span>.Hashtbl.S <span class="keyword">with</span> <span><span class="keyword">type</span> <span class="xref-unresolved">key</span> = <span class="xref-unresolved">t</span></span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-orig" class="anchored"><a href="#val-orig" class="anchor"></a><code><span><span class="keyword">val</span> orig : <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>the point <code>{x=0.; y=0.}</code></p></div></div><div class="odoc-spec"><div class="spec value" id="val-center" class="anchored"><a href="#val-center" class="anchor"></a><code><span><span class="keyword">val</span> center : <span><a href="#type-t">t</a> <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-determinant" class="anchored"><a href="#val-determinant" class="anchor"></a><code><span><span class="keyword">val</span> determinant : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <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-iso_barycenter" class="anchored"><a href="#val-iso_barycenter" class="anchor"></a><code><span><span class="keyword">val</span> iso_barycenter : <span><span><a href="#type-t">t</a> list</span> <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-barycenter" class="anchored"><a href="#val-barycenter" class="anchor"></a><code><span><span class="keyword">val</span> barycenter : <span><span><span>(<a href="#type-t">t</a> * float)</span> list</span> <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-sq_distance" class="anchored"><a href="#val-sq_distance" class="anchor"></a><code><span><span class="keyword">val</span> sq_distance : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> float</span></code></div><div class="spec-doc"><p>square distance between two points</p></div></div><div class="odoc-spec"><div class="spec value" id="val-distance" class="anchored"><a href="#val-distance" class="anchor"></a><code><span><span class="keyword">val</span> distance : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> float</span></code></div><div class="spec-doc"><p>distance</p></div></div><div class="odoc-spec"><div class="spec value" id="val-x_coord" class="anchored"><a href="#val-x_coord" class="anchor"></a><code><span><span class="keyword">val</span> x_coord : <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-y_coord" class="anchored"><a href="#val-y_coord" class="anchor"></a><code><span><span class="keyword">val</span> y_coord : <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-scale_x" class="anchored"><a href="#val-scale_x" class="anchor"></a><code><span><span class="keyword">val</span> scale_x : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>float <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-scale_y" class="anchored"><a href="#val-scale_y" class="anchor"></a><code><span><span class="keyword">val</span> scale_y : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>float <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-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-reflection" class="anchored"><a href="#val-reflection" class="anchor"></a><code><span><span class="keyword">val</span> reflection : <span><a href="#type-t">t</a> <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 class="spec-doc"><p>point reflection. reflection p1 p2 returns the symerical point of p2 with respect to p1</p></div></div><div class="odoc-spec"><div class="spec value" id="val-rotate" class="anchored"><a href="#val-rotate" class="anchor"></a><code><span><span class="keyword">val</span> rotate : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>float <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>point rotation. rotate p1 p2 f returns the rotation point of p2 with p1 as center and f a angle in radian</p></div></div><div class="odoc-spec"><div class="spec value" id="val-rotate_angle" class="anchored"><a href="#val-rotate_angle" class="anchor"></a><code><span><span class="keyword">val</span> rotate_angle : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>float <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>point rotation. rotate p1 p2 f returns the rotation point of p2 with p1 as center and f a angle in degree</p></div></div><div class="odoc-spec"><div class="spec value" id="val-print" class="anchored"><a href="#val-print" class="anchor"></a><code><span><span class="keyword">val</span> print : <span><span class="xref-unresolved">Stdlib</span>.Format.formatter <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>printer</p></div></div></div></body></html>