31 lines
8.3 KiB
HTML
31 lines
8.3 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Adaptive Precision Floating-Point Arithmetic and Fast Robust Predicates for Computational Geometry"><title>robust - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="robust" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="../robust/index.html"><img src="https://raw.githubusercontent.com/georust/meta/master/logo/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../robust/index.html"><img src="https://raw.githubusercontent.com/georust/meta/master/logo/logo.png" alt="logo"></a><h2><a href="../robust/index.html">robust</a><span class="version">1.1.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#adaptive-precision-floating-point-arithmetic-and-fast-robust-predicates-for-computational-geometry" title="Adaptive Precision Floating-Point Arithmetic and Fast Robust Predicates for Computational Geometry">Adaptive Precision Floating-Point Arithmetic and Fast Robust Predicates for Computational Geometry</a></li><li><a href="#features" title="Features">Features</a></li></ul><h3><a href="#structs">Crate Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>robust</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/robust/lib.rs.html#1-2650">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="adaptive-precision-floating-point-arithmetic-and-fast-robust-predicates-for-computational-geometry"><a class="doc-anchor" href="#adaptive-precision-floating-point-arithmetic-and-fast-robust-predicates-for-computational-geometry">§</a>Adaptive Precision Floating-Point Arithmetic and Fast Robust Predicates for Computational Geometry</h2>
|
||
<p>This is a direct transcript of the source code and algorithms provided by
|
||
Jonathan Richard Shewchuk (<a href="https://www.cs.cmu.edu/~quake/robust.html">https://www.cs.cmu.edu/~quake/robust.html</a>)
|
||
See the paper and the source code for more information.</p>
|
||
<p>The module offers adaptive and precise calculations for orientation queries
|
||
– “on which side of a line (2d) or plane (3d) does a point lie?” – and in-circle / in-sphere queries
|
||
– “is a given point contained in the circumference of a triangle?”.<br />
|
||
The “adaptive” nature will increase performance only if a simpler calculation
|
||
cannot be guaranteed to be accurate enough, yielding higher performance on
|
||
average.</p>
|
||
<p>The public API will accept both <code>f32</code> and <code>f64</code> input points for predicate checking, with input being converted to
|
||
<code>f64</code> values for internal use.
|
||
This has no effect on precision, as the <a href="https://drive.google.com/file/d/0B3O3Ys97VjtxYXBCY08wanNoZ1U/view">IEEE-754 standard</a> (section 5.3)
|
||
guarantees that conversion from <code>f32</code> to <code>f64</code> must be exact.</p>
|
||
<h2 id="features"><a class="doc-anchor" href="#features">§</a>Features</h2>
|
||
<ul>
|
||
<li><code>no_std</code>: Build without the Rust standard library</li>
|
||
</ul>
|
||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Coord.html" title="struct robust::Coord">Coord</a></div><div class="desc docblock-short">A two dimensional coordinate.</div></li><li><div class="item-name"><a class="struct" href="struct.Coord3D.html" title="struct robust::Coord3D">Coord3D</a></div><div class="desc docblock-short">A three dimensional coordinate.</div></li></ul><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="fn" href="fn.incircle.html" title="fn robust::incircle">incircle</a></div><div class="desc docblock-short">Returns a positive value if the coordinate <code>pd</code> lies <strong>inside</strong> the circle passing through <code>pa</code>, <code>pb</code>, and <code>pc</code>.<br />
|
||
Returns a negative value if it lies <strong>outside</strong> the circle.<br />
|
||
Returns <code>0</code> if the four points are <strong>cocircular</strong>.<br />
|
||
<strong>Note</strong>: The points <code>pa</code>, <code>pb</code>, and <code>pc</code> must be in <strong>counterclockwise order</strong>, or the sign of the result will be reversed.</div></li><li><div class="item-name"><a class="fn" href="fn.insphere.html" title="fn robust::insphere">insphere</a></div><div class="desc docblock-short">Returns a positive value if the point <code>pe</code> lies inside the sphere passing through <code>pa</code>, <code>pb</code>, <code>pc</code>, and <code>pd</code>.<br />
|
||
Returns a negative value if it lies outside.<br />
|
||
Returns <code>0</code> if the five points are <strong>cospherical</strong>.<br />
|
||
<strong>NOTE</strong>: The points <code>pa</code>, <code>pb</code>, <code>pc</code>, and <code>pd</code> must be ordered so that they have a positive orientation.</div></li><li><div class="item-name"><a class="fn" href="fn.orient2d.html" title="fn robust::orient2d">orient2d</a></div><div class="desc docblock-short">Returns a positive value if the coordinates <code>pa</code>, <code>pb</code>, and <code>pc</code> occur in counterclockwise order
|
||
(<code>pc</code> lies to the <strong>left</strong> of the directed line defined by coordinates <code>pa</code> and <code>pb</code>).<br />
|
||
Returns a negative value if they occur in clockwise order (<code>pc</code> lies to the <strong>right</strong> of the directed line <code>pa, pb</code>).<br />
|
||
Returns <code>0</code> if they are <strong>collinear</strong>.</div></li><li><div class="item-name"><a class="fn" href="fn.orient3d.html" title="fn robust::orient3d">orient3d</a></div><div class="desc docblock-short">Returns a positive value if the point <code>pd</code> lies below the plane passing through <code>pa</code>, <code>pb</code>, and <code>pc</code>
|
||
(“below” is defined so that <code>pa</code>, <code>pb</code>, and <code>pc</code> appear in counterclockwise order when viewed from above the plane).<br />
|
||
Returns a negative value if <code>pd</code> lies above the plane.<br />
|
||
Returns <code>0</code> if they are <strong>coplanar</strong>.</div></li></ul></section></div></main></body></html> |