<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Segment (geoml.Geoml.Segment)</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; Segment</nav><header class="odoc-preamble"><h1>Module <code><span>Geoml.Segment</span></code></h1><p>Segment 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> = <a href="../Point/index.html#type-t">Point.t</a> * <a href="../Point/index.html#type-t">Point.t</a></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> <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-extr1" class="anchored"><a href="#val-extr1" class="anchor"></a><code><span><span class="keyword">val</span> extr1 : <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-extr2" class="anchored"><a href="#val-extr2" class="anchor"></a><code><span><span class="keyword">val</span> extr2 : <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-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> <a href="../Point/index.html#type-t">Point.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-equation" class="anchored"><a href="#val-equation" class="anchor"></a><code><span><span class="keyword">val</span> equation : <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="../Point/index.html#type-t">Point.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-sq_size" class="anchored"><a href="#val-sq_size" class="anchor"></a><code><span><span class="keyword">val</span> sq_size : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> float</span></code></div><div class="spec-doc"><p>returns the square size of a segment</p></div></div><div class="odoc-spec"><div class="spec value" id="val-size" class="anchored"><a href="#val-size" class="anchor"></a><code><span><span class="keyword">val</span> size : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> float</span></code></div><div class="spec-doc"><p>returns the size of a segment</p></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-to_line" class="anchored"><a href="#val-to_line" class="anchor"></a><code><span><span class="keyword">val</span> to_line : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Line/index.html#type-t">Line.t</a></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-proj_x" class="anchored"><a href="#val-proj_x" class="anchor"></a><code><span><span class="keyword">val</span> proj_x : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> float * float</span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-proj_y" class="anchored"><a href="#val-proj_y" class="anchor"></a><code><span><span class="keyword">val</span> proj_y : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> float * float</span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-intersects" class="anchored"><a href="#val-intersects" class="anchor"></a><code><span><span class="keyword">val</span> intersects : <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> bool</span></code></div><div class="spec-doc"><p>intersects a b, returns true if a and b intersect. false otherwise</p></div></div><div class="odoc-spec"><div class="spec value" id="val-intersection" class="anchored"><a href="#val-intersection" class="anchor"></a><code><span><span class="keyword">val</span> intersection : <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="../Point/index.html#type-t">Point.t</a> option</span></span></code></div><div class="spec-doc"><p>returns the intersection point of two segments. returns None if they don't intersect</p></div></div><div class="odoc-spec"><div class="spec value" id="val-intersect_line" class="anchored"><a href="#val-intersect_line" class="anchor"></a><code><span><span class="keyword">val</span> intersect_line : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Line/index.html#type-t">Line.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Point/index.html#type-t">Point.t</a> option</span></span></code></div><div class="spec-doc"><p>returns the intersection point of a segment and a line. returns None if they don't intersect</p></div></div></div></body></html>