<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Geoml__Vector (geoml.Geoml__Vector)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> â€“ <a href="../index.html">geoml</a> &#x00BB; Geoml__Vector</nav><h1>Module <code>Geoml__Vector</code></h1></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = <span class="keyword">private</span> </code><code>{</code><table class="record"><tr id="type-t.dx" class="anchored"><td class="def field"><a href="#type-t.dx" class="anchor"></a><code>dx : float;</code></td></tr><tr id="type-t.dy" class="anchored"><td class="def field"><a href="#type-t.dy" class="anchor"></a><code>dy : float;</code></td></tr></table><code>}</code></dt><dd><p>The module for the euclidean vector manipulation.</p></dd></dl><dl><dt class="spec value" id="val-make"><a href="#val-make" class="anchor"></a><code><span class="keyword">val</span> make : float <span>&#45;&gt;</span> float <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-null"><a href="#val-null" class="anchor"></a><code><span class="keyword">val</span> null : <a href="index.html#type-t">t</a></code></dt><dd><p>null vector</p></dd></dl><dl><dt class="spec value" id="val-x_coord"><a href="#val-x_coord" class="anchor"></a><code><span class="keyword">val</span> x_coord : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dt class="spec value" id="val-y_coord"><a href="#val-y_coord" class="anchor"></a><code><span class="keyword">val</span> y_coord : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dt class="spec value" id="val-of_points"><a href="#val-of_points" class="anchor"></a><code><span class="keyword">val</span> of_points : <a href="../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>of_points a b returns the vector begining at a and landing at b</p></dd></dl><dl><dt class="spec value" id="val-magnitude"><a href="#val-magnitude" class="anchor"></a><code><span class="keyword">val</span> magnitude : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dd><p>returns the norm of a vector</p></dd></dl><dl><dt class="spec value" id="val-magnitude_sq"><a href="#val-magnitude_sq" class="anchor"></a><code><span class="keyword">val</span> magnitude_sq : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dd><p>returns the square of the norm of a vector</p></dd></dl><dl><dt class="spec value" id="val-normalize"><a href="#val-normalize" class="anchor"></a><code><span class="keyword">val</span> normalize : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>return a vector with same direction but with a norm equal to 1.</p></dd></dl><dl><dt class="spec value" id="val-rotation"><a href="#val-rotation" class="anchor"></a><code><span class="keyword">val</span> rotation : float <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-dot_product"><a href="#val-dot_product" class="anchor"></a><code><span class="keyword">val</span> dot_product : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dd><p>dot product of two vectors</p></dd></dl><dl><dt class="spec value" id="val-scal_mult"><a href="#val-scal_mult" class="anchor"></a><code><span class="keyword">val</span> scal_mult : float <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>scalar product of two vectors</p></dd></dl><dl><dt class="spec value" id="val-determinant"><a href="#val-determinant" class="anchor"></a><code><span class="keyword">val</span> determinant : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dt class="spec value" id="val-opposite"><a href="#val-opposite" class="anchor"></a><code><span class="keyword">val</span> opposite : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-add"><a href="#val-add" class="anchor"></a><code><span class="keyword">val</span> add : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>vector addition</p></dd></dl><dl><dt class="spec value" id="val-substract"><a href="#val-substract" class="anchor"></a><code><span class="keyword">val</span> substract : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>vector substraction</p></dd></dl><dl><dt class="spec value" id="val-move_to"><a href="#val-move_to" class="anchor"></a><code><span class="keyword">val</span> move_to : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../Geoml/Point/index.html#type-t">Geoml.Point.t</a> <span>&#45;&gt;</span> <a href="../Geoml/Point/index.html#type-t">Geoml.Point.t</a></code></dt><dd><p>move_to v p returns the translation of p according to the vector v</p></dd></dl><dl><dt class="spec value" id="val-projection"><a href="#val-projection" class="anchor"></a><code><span class="keyword">val</span> projection : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>projection v1 v2 returns the projection of v1 on v2</p></dd></dl><dl><dt class="spec value" id="val-angle"><a href="#val-angle" class="anchor"></a><code><span class="keyword">val</span> angle : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dd><p>returns the angle between two vectors</p></dd></dl><dl><dt class="spec value" id="val-angle_deg"><a href="#val-angle_deg" class="anchor"></a><code><span class="keyword">val</span> angle_deg : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> float</code></dt><dd><p>compute the angle in radians</p><p>compute the angle in degrees</p></dd></dl><dl><dt class="spec value" id="val-reflect"><a href="#val-reflect" class="anchor"></a><code><span class="keyword">val</span> reflect : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dd><p>reflect a b returns the reflected vector of a according to b</p></dd></dl><dl><dt class="spec value" id="val-print"><a href="#val-print" class="anchor"></a><code><span class="keyword">val</span> print : Stdlib.Format.formatter <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt></dl></div></body></html>