abstreet/rustdoc/geom/index.html
2022-05-21 16:24:57 +00:00

39 lines
17 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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="API documentation for the Rust `geom` crate."><meta name="keywords" content="rust, rustlang, rust-lang, geom"><title>geom - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../ayu.css" disabled><link rel="stylesheet" type="text/css" href="../dark.css" disabled><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../storage.js"></script><script src="../crates.js"></script><script defer src="../main.js"></script>
<noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../favicon.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">&#9776;</button><a class="sidebar-logo" href="../geom/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
</a><h2 class="location"></h2>
</nav>
<nav class="sidebar"><a class="sidebar-logo" href="../geom/index.html"><div class="logo-container"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></div>
</a><h2 class="location"><a href="#">Crate geom</a></h2><div class="sidebar-elems"><div class="block"><ul><li class="version">Version 0.1.0</li><li><a id="all-types" href="all.html">All Items</a></li></div></ul><section><div class="block"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#constants">Constants</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div></section><div id="sidebar-vars" data-name="geom" data-ty="mod" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><main><div class="width-limiter"><div class="sub-container"><a class="sub-logo-container" href="../geom/index.html"><img class="rust-logo" src="../rust-logo.svg" alt="logo"></a><nav class="sub"><div class="theme-picker hidden"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="22" height="22" alt="Pick another theme!" src="../brush.svg"></button><div id="theme-choices" role="menu"></div></div><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../wheel.svg"></a></div></form></nav></div><section id="main-content" class="content"><div class="main-heading">
<h1 class="fqn"><span class="in-band">Crate <a class="mod" href="#">geom</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span></h1><span class="out-of-band"><a class="srclink" href="../src/geom/lib.rs.html#1-140">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><h2 id="modules" class="small-section-header"><a href="#modules">Modules</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="mod" href="angle/index.html" title="geom::angle mod">angle</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="bounds/index.html" title="geom::bounds mod">bounds</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="circle/index.html" title="geom::circle mod">circle</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="conversions/index.html" title="geom::conversions mod">conversions</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"><p>Conversions between this crate and <code>geo</code>. Long-term, we should think about directly using <code>geo</code>
or wrapping it, but in the meantime…</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="distance/index.html" title="geom::distance mod">distance</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="duration/index.html" title="geom::duration mod">duration</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="find_closest/index.html" title="geom::find_closest mod">find_closest</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="gps/index.html" title="geom::gps mod">gps</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="line/index.html" title="geom::line mod">line</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="percent/index.html" title="geom::percent mod">percent</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="polygon/index.html" title="geom::polygon mod">polygon</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="polyline/index.html" title="geom::polyline mod">polyline</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="pt/index.html" title="geom::pt mod">pt</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="ring/index.html" title="geom::ring mod">ring</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="speed/index.html" title="geom::speed mod">speed</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="stats/index.html" title="geom::stats mod">stats</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="mod" href="time/index.html" title="geom::time mod">time</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"></div></div></div><h2 id="structs" class="small-section-header"><a href="#structs">Structs</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Angle.html" title="geom::Angle struct">Angle</a></div><div class="item-right docblock-short"><p>An angle, stored in radians.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Bounds.html" title="geom::Bounds struct">Bounds</a></div><div class="item-right docblock-short"><p>Represents a rectangular boundary of <code>Pt2D</code> points.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Circle.html" title="geom::Circle struct">Circle</a></div><div class="item-right docblock-short"><p>A circle, defined by a center and radius.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.CornerRadii.html" title="geom::CornerRadii struct">CornerRadii</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Distance.html" title="geom::Distance struct">Distance</a></div><div class="item-right docblock-short"><p>A distance, in meters. Can be negative.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Duration.html" title="geom::Duration struct">Duration</a></div><div class="item-right docblock-short"><p>A duration, in seconds. Can be negative.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.FindClosest.html" title="geom::FindClosest struct">FindClosest</a></div><div class="item-right docblock-short"><p>A quad-tree to quickly find the closest points to some polylines.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.GPSBounds.html" title="geom::GPSBounds struct">GPSBounds</a></div><div class="item-right docblock-short"><p>Represents a rectangular boundary of <code>LonLat</code> points. After building one of these, <code>LonLat</code>s
can be transformed into <code>Pt2D</code>s, treating the top-left of the boundary as (0, 0), and growing
to the right and down (screen-drawing order, not Cartesian) in meters.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.HashablePt2D.html" title="geom::HashablePt2D struct">HashablePt2D</a></div><div class="item-right docblock-short"><p>This represents world space, NOT LonLat.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Histogram.html" title="geom::Histogram struct">Histogram</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.InfiniteLine.html" title="geom::InfiniteLine struct">InfiniteLine</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Line.html" title="geom::Line struct">Line</a></div><div class="item-right docblock-short"><p>A line segment.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.LonLat.html" title="geom::LonLat struct">LonLat</a></div><div class="item-right docblock-short"><p>Represents a (longitude, latitude) point.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Percent.html" title="geom::Percent struct">Percent</a></div><div class="item-right docblock-short"><p>Most of the time, [0, 1]. But some callers may go outside this range.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.PolyLine.html" title="geom::PolyLine struct">PolyLine</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Polygon.html" title="geom::Polygon struct">Polygon</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Pt2D.html" title="geom::Pt2D struct">Pt2D</a></div><div class="item-right docblock-short"><p>This represents world-space in meters.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Ring.html" title="geom::Ring struct">Ring</a></div><div class="item-right docblock-short"><p>Maybe a misnomer, but like a PolyLine, but closed.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Speed.html" title="geom::Speed struct">Speed</a></div><div class="item-right docblock-short"><p>In meters per second. Can be negative.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Time.html" title="geom::Time struct">Time</a></div><div class="item-right docblock-short"><p>In seconds since midnight. Cant be negative.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.Triangle.html" title="geom::Triangle struct">Triangle</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="struct" href="struct.UnitFmt.html" title="geom::UnitFmt struct">UnitFmt</a></div><div class="item-right docblock-short"><p>Specifies how to stringify different geom objects.</p>
</div></div></div><h2 id="enums" class="small-section-header"><a href="#enums">Enums</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.ArrowCap.html" title="geom::ArrowCap enum">ArrowCap</a></div><div class="item-right docblock-short"></div></div><div class="item-row"><div class="item-left module-item"><a class="enum" href="enum.Statistic.html" title="geom::Statistic enum">Statistic</a></div><div class="item-right docblock-short"></div></div></div><h2 id="constants" class="small-section-header"><a href="#constants">Constants</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="constant" href="constant.EPSILON_DIST.html" title="geom::EPSILON_DIST constant">EPSILON_DIST</a></div><div class="item-right docblock-short"></div></div></div><h2 id="traits" class="small-section-header"><a href="#traits">Traits</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="trait" href="trait.HgramValue.html" title="geom::HgramValue trait">HgramValue</a></div><div class="item-right docblock-short"></div></div></div><h2 id="functions" class="small-section-header"><a href="#functions">Functions</a></h2>
<div class="item-table"><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.deserialize_f64.html" title="geom::deserialize_f64 fn">deserialize_f64</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"><p>Deserializes a trimmed <code>f64</code> from an <code>i32</code>.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.serialize_f64.html" title="geom::serialize_f64 fn">serialize_f64</a><span title="Restricted Visibility">&nbsp;🔒</span> </div><div class="item-right docblock-short"><p>Serializes a trimmed <code>f64</code> as an <code>i32</code> to save space.</p>
</div></div><div class="item-row"><div class="item-left module-item"><a class="fn" href="fn.trim_f64.html" title="geom::trim_f64 fn">trim_f64</a></div><div class="item-right docblock-short"><p>Reduce the precision of an f64. This helps ensure serialization is idempotent (everything is
exacly the same before and after saving/loading). Ideally wed use some kind of proper
fixed-precision type instead of f64.</p>
</div></div></div></section><section id="search" class="content hidden"></section></div></main><div id="rustdoc-vars" data-root-path="../" data-current-crate="geom" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.61.0 (fe5b13d68 2022-05-18)" ></div>
</body></html>