Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (26 sloc) 1.99 KB
<html><head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class attributes" rel=Appendix href="index_attributes.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Interpolate" rel="Chapter" href="Interpolate.html">
<link title="Transition" rel="Chapter" href="Transition.html">
<link title="Camera" rel="Chapter" href="Camera.html">
<link title="Loader" rel="Chapter" href="Loader.html">
<link title="ParticleTrans" rel="Chapter" href="ParticleTrans.html">
<link title="Particle" rel="Chapter" href="Particle.html">
<link title="Main" rel="Chapter" href="Main.html"><title>Interpolate.normalize</title>
</head>
<body>
<code class="code"><span class="keyword">let</span>&nbsp;normalize&nbsp;v&nbsp;=<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">let</span>&nbsp;squared_norm&nbsp;(<span class="constructor">DVertex</span>(x,&nbsp;y,&nbsp;z,&nbsp;d))&nbsp;=<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;*.&nbsp;x&nbsp;+.&nbsp;y&nbsp;*.&nbsp;y&nbsp;+.&nbsp;z&nbsp;*.&nbsp;z<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">in</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">let</span>&nbsp;n&nbsp;=&nbsp;sqrt&nbsp;(squared_norm&nbsp;v)&nbsp;<span class="keyword">in</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">let</span>&nbsp;<span class="constructor">DVertex</span>(x,&nbsp;y,&nbsp;z,&nbsp;d)&nbsp;=&nbsp;v&nbsp;<span class="keyword">in</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="constructor">DVertex</span>(x&nbsp;/.&nbsp;n,&nbsp;y&nbsp;/.&nbsp;n,&nbsp;z&nbsp;/.&nbsp;n,&nbsp;d)</code></body></html>
Jump to Line
Something went wrong with that request. Please try again.