5 lines
5.4 KiB
HTML
5 lines
5.4 KiB
HTML
<!DOCTYPE html PUBLIC ""
|
|
"">
|
|
<html><head><meta charset="UTF-8" /><title>walkmap.vertex documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Walkmap</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction to walkmap</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>walkmap</span></div></div></li><li class="depth-2 branch"><a href="walkmap.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="walkmap.edge.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>edge</span></div></a></li><li class="depth-2 branch"><a href="walkmap.geometry.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>geometry</span></div></a></li><li class="depth-2 branch"><a href="walkmap.path.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>path</span></div></a></li><li class="depth-2 branch"><a href="walkmap.polygon.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>polygon</span></div></a></li><li class="depth-2 branch"><a href="walkmap.stl.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>stl</span></div></a></li><li class="depth-2 branch"><a href="walkmap.svg.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>svg</span></div></a></li><li class="depth-2 current"><a href="walkmap.vertex.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vertex</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="walkmap.vertex.html#var-ensure2d"><div class="inner"><span>ensure2d</span></div></a></li><li class="depth-1"><a href="walkmap.vertex.html#var-ensure3d"><div class="inner"><span>ensure3d</span></div></a></li><li class="depth-1"><a href="walkmap.vertex.html#var-vertex.3F"><div class="inner"><span>vertex?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">walkmap.vertex</h1><div class="doc"><div class="markdown"><p>Essentially the specification for things we shall consider to be vertices.</p></div></div><div class="public anchor" id="var-ensure2d"><h3>ensure2d</h3><div class="usage"><code>(ensure2d o)</code></div><div class="doc"><div class="markdown"><p>If <code>o</code> is a vertex, set its <code>:z</code> value to zero; else throw an exception.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/vertex.clj#L34">view source</a></div></div><div class="public anchor" id="var-ensure3d"><h3>ensure3d</h3><div class="usage"><code>(ensure3d o)</code><code>(ensure3d o dflt)</code></div><div class="doc"><div class="markdown"><p>Given a vertex <code>o</code>, if <code>o</code> has a <code>:z</code> value, just return <code>o</code>; otherwise return a vertex like <code>o</code> but having thie <code>dflt</code> value as the value of its <code>:z</code> key, or zero as the value of its <code>:z</code> key if <code>dflt</code> is not specified.</p>
|
|
<p>If <code>o</code> is not a vertex, throws an exception.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/vertex.clj#L20">view source</a></div></div><div class="public anchor" id="var-vertex.3F"><h3>vertex?</h3><div class="usage"><code>(vertex? o)</code></div><div class="doc"><div class="markdown"><p>True if <code>o</code> satisfies the conditions for a vertex. That is, essentially, that it must rerpresent a two- or three- dimensional vector. A vertex is shall be a map having at least the keys <code>:x</code> and <code>:y</code>, where the value of those keys is a number. If the key <code>:z</code> is also present, its value must also be a number.</p>
|
|
<p>The name <code>vector?</code> was not used as that would clash with a function of that name in <code>clojure.core</code> whose semantics are entirely different.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/walkmap/blob/master/src/walkmap/vertex.clj#L4">view source</a></div></div></div></body></html> |