You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

136 lines
14 KiB

<!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 `c32` struct in crate `complex`.">
<meta name="keywords" content="rust, rustlang, rust-lang, c32">
<title>complex::c32 - Rust</title>
<link rel="stylesheet" type="text/css" href="../main.css">
</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<section class="sidebar">
<p class='location'><a href='index.html'>complex</a></p><script>window.sidebarCurrent = {name: 'c32', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</section>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press 'S' to search, '?' for more options..."
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='index.html'>complex</a>::<wbr><a class='struct' href=''>c32</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a id='src-123' class='srclink' href='../src/complex/lib.rs.html#66' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct c32(pub <a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>, pub <a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>);</pre><div class='docblock'><p>A complex number with 32-bit parts.</p>
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><code>impl <a class='trait' href='../complex/trait.Number.html' title='complex::Number'>Number</a> for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl <a class='trait' href='../complex/trait.Complex.html' title='complex::Complex'>Complex</a> for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='assoc_type.Real' class='type'><code>type Real = <a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a></code></h4>
<h4 id='method.new' class='method'><code>fn <a href='../complex/trait.Complex.html#method.new' class='fnname'>new</a>(re: Self::Real, im: Self::Real) -&gt; <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h4>
<h4 id='method.from_polar' class='method'><code>fn <a href='../complex/trait.Complex.html#method.from_polar' class='fnname'>from_polar</a>(abs: Self::Real, arg: Self::Real) -&gt; Self</code></h4>
<h4 id='method.re' class='method'><code>fn <a href='../complex/trait.Complex.html#method.re' class='fnname'>re</a>(&amp;self) -&gt; Self::Real</code></h4>
<h4 id='method.re_mut' class='method'><code>fn <a href='../complex/trait.Complex.html#method.re_mut' class='fnname'>re_mut</a>(&amp;mut self) -&gt; &amp;mut Self::Real</code></h4>
<h4 id='method.im' class='method'><code>fn <a href='../complex/trait.Complex.html#method.im' class='fnname'>im</a>(&amp;self) -&gt; Self::Real</code></h4>
<h4 id='method.im_mut' class='method'><code>fn <a href='../complex/trait.Complex.html#method.im_mut' class='fnname'>im_mut</a>(&amp;mut self) -&gt; &amp;mut Self::Real</code></h4>
<h4 id='method.abs' class='method'><code>fn <a href='../complex/trait.Complex.html#method.abs' class='fnname'>abs</a>(&amp;self) -&gt; Self::Real</code></h4>
<h4 id='method.arg' class='method'><code>fn <a href='../complex/trait.Complex.html#method.arg' class='fnname'>arg</a>(&amp;self) -&gt; Self::Real</code></h4>
<h4 id='method.to_polar' class='method'><code>fn <a href='../complex/trait.Complex.html#method.to_polar' class='fnname'>to_polar</a>(&amp;self) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.tuple.html'>(Self::<a class='trait' href='../complex/trait.Complex.html' title='complex::Complex'>Real</a>, Self::<a class='trait' href='../complex/trait.Complex.html' title='complex::Complex'>Real</a>)</a></code></h4>
<h4 id='method.conj' class='method'><code>fn <a href='../complex/trait.Complex.html#method.conj' class='fnname'>conj</a>(&amp;self) -&gt; Self</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a> for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = Self</code></h4>
<h4 id='method.add' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/ops/trait.Add.html#method.add' class='fnname'>add</a>(self, rhs: Self) -&gt; Self::Output</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Add.html' title='core::ops::Add'>Add</a>&lt;<a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>&gt; for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = Self</code></h4>
<h4 id='method.add' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/ops/trait.Add.html#method.add' class='fnname'>add</a>(self, rhs: <a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -&gt; Self::Output</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Div.html' title='core::ops::Div'>Div</a> for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = Self</code></h4>
<h4 id='method.div' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/ops/trait.Div.html#method.div' class='fnname'>div</a>(self, rhs: Self) -&gt; Self::Output</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Div.html' title='core::ops::Div'>Div</a>&lt;<a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>&gt; for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = Self</code></h4>
<h4 id='method.div' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/ops/trait.Div.html#method.div' class='fnname'>div</a>(self, rhs: <a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -&gt; Self::Output</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a> for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = Self</code></h4>
<h4 id='method.mul' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/ops/trait.Mul.html#method.mul' class='fnname'>mul</a>(self, rhs: Self) -&gt; Self::Output</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Mul.html' title='core::ops::Mul'>Mul</a>&lt;<a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>&gt; for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = Self</code></h4>
<h4 id='method.mul' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/ops/trait.Mul.html#method.mul' class='fnname'>mul</a>(self, rhs: <a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -&gt; Self::Output</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Neg.html' title='core::ops::Neg'>Neg</a> for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = Self</code></h4>
<h4 id='method.neg' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/ops/trait.Neg.html#method.neg' class='fnname'>neg</a>(self) -&gt; Self::Output</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Sub.html' title='core::ops::Sub'>Sub</a> for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = Self</code></h4>
<h4 id='method.sub' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/ops/trait.Sub.html#method.sub' class='fnname'>sub</a>(self, rhs: Self) -&gt; Self::Output</code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/ops/trait.Sub.html' title='core::ops::Sub'>Sub</a>&lt;<a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>&gt; for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='assoc_type.Output' class='type'><code>type Output = Self</code></h4>
<h4 id='method.sub' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/ops/trait.Sub.html#method.sub' class='fnname'>sub</a>(self, rhs: <a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -&gt; Self::Output</code></h4>
</div><h3 id='derived_implementations'>Derived Implementations </h3><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html' title='core::cmp::PartialEq'>PartialEq</a> for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='method.eq' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.eq' class='fnname'>eq</a>(&amp;self, __arg_0: &amp;<a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a>) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
<h4 id='method.ne' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&amp;self, __arg_0: &amp;<a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a>) -&gt; <a href='http://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a></code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#method.fmt' class='fnname'>fmt</a>(&amp;self, __arg_0: &amp;mut <a class='struct' href='http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='http://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
</div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/marker/trait.Copy.html' title='core::marker::Copy'>Copy</a> for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'></div><h3 class='impl'><code>impl <a class='trait' href='http://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h3><div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a></code></h4>
<h4 id='method.clone_from' class='method'><code>fn <a href='http://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code></h4>
</div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<div id="help" class="hidden">
<div class="shortcuts">
<h1>Keyboard shortcuts</h1>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>&larrb;</dt>
<dd>Move up in search results</dd>
<dt>&rarrb;</dt>
<dd>Move down in search results</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
</dl>
</div>
<div class="infos">
<h1>Search tricks</h1>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>typedef</code> (or
<code>tdef</code>).
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code>)
</p>
</div>
</div>
<script>
window.rootPath = "../";
window.currentCrate = "complex";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script async src="../search-index.js"></script>
</body>
</html>