|
|
<!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'>−</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) -> <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) -> Self</code></h4> <h4 id='method.re' class='method'><code>fn <a href='../complex/trait.Complex.html#method.re' class='fnname'>re</a>(&self) -> 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>(&mut self) -> &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>(&self) -> 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>(&mut self) -> &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>(&self) -> Self::Real</code></h4> <h4 id='method.arg' class='method'><code>fn <a href='../complex/trait.Complex.html#method.arg' class='fnname'>arg</a>(&self) -> 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>(&self) -> <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>(&self) -> 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) -> 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><<a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</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: <a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -> 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) -> 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><<a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</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: <a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -> 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) -> 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><<a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</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: <a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -> 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) -> 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) -> 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><<a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</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: <a href='http://doc.rust-lang.org/nightly/std/primitive.f32.html'>f32</a>) -> 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>(&self, __arg_0: &<a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a>) -> <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>(&self, __arg_0: &<a class='struct' href='../complex/struct.c32.html' title='complex::c32'>c32</a>) -> <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>(&self, __arg_0: &mut <a class='struct' href='http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -> <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>(&self) -> <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>(&mut self, source: &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>⇤</dt> <dd>Move up in search results</dd> <dt>⇥</dt> <dd>Move down in search results</dd> <dt>⏎</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>
|