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.

135 lines
14 KiB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta name="generator" content="rustdoc">
  7. <meta name="description" content="API documentation for the Rust `c32` struct in crate `complex`.">
  8. <meta name="keywords" content="rust, rustlang, rust-lang, c32">
  9. <title>complex::c32 - Rust</title>
  10. <link rel="stylesheet" type="text/css" href="../main.css">
  11. </head>
  12. <body class="rustdoc">
  13. <!--[if lte IE 8]>
  14. <div class="warning">
  15. This old browser is unsupported and will most likely display funky
  16. things.
  17. </div>
  18. <![endif]-->
  19. <section class="sidebar">
  20. <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>
  21. </section>
  22. <nav class="sub">
  23. <form class="search-form js-only">
  24. <div class="search-container">
  25. <input class="search-input" name="search"
  26. autocomplete="off"
  27. placeholder="Click or press 'S' to search, '?' for more options..."
  28. type="search">
  29. </div>
  30. </form>
  31. </nav>
  32. <section id='main' class="content struct">
  33. <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'>
  34. <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
  35. [<span class='inner'>&#x2212;</span>]
  36. </a>
  37. </span><a id='src-123' class='srclink' href='../src/complex/lib.rs.html#66' title='goto source code'>[src]</a></span></h1>
  38. <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>
  39. </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>
  40. <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>
  41. <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>
  42. <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>
  43. <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>
  44. <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>
  45. <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>
  46. <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>
  47. <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>
  48. <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>
  49. <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>
  50. </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>
  51. <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>
  52. </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>
  53. <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>
  54. </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>
  55. <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>
  56. </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>
  57. <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>
  58. </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>
  59. <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>
  60. </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>
  61. <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>
  62. </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>
  63. <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>
  64. </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>
  65. <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>
  66. </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>
  67. <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>
  68. </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>
  69. <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>
  70. </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>
  71. </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>
  72. <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>
  73. </div></section>
  74. <section id='search' class="content hidden"></section>
  75. <section class="footer"></section>
  76. <div id="help" class="hidden">
  77. <div class="shortcuts">
  78. <h1>Keyboard shortcuts</h1>
  79. <dl>
  80. <dt>?</dt>
  81. <dd>Show this help dialog</dd>
  82. <dt>S</dt>
  83. <dd>Focus the search field</dd>
  84. <dt>&larrb;</dt>
  85. <dd>Move up in search results</dd>
  86. <dt>&rarrb;</dt>
  87. <dd>Move down in search results</dd>
  88. <dt>&#9166;</dt>
  89. <dd>Go to active search result</dd>
  90. </dl>
  91. </div>
  92. <div class="infos">
  93. <h1>Search tricks</h1>
  94. <p>
  95. Prefix searches with a type followed by a colon (e.g.
  96. <code>fn:</code>) to restrict the search to a given type.
  97. </p>
  98. <p>
  99. Accepted types are: <code>fn</code>, <code>mod</code>,
  100. <code>struct</code>, <code>enum</code>,
  101. <code>trait</code>, <code>typedef</code> (or
  102. <code>tdef</code>).
  103. </p>
  104. <p>
  105. Search functions by type signature (e.g.
  106. <code>vec -> usize</code>)
  107. </p>
  108. </div>
  109. </div>
  110. <script>
  111. window.rootPath = "../";
  112. window.currentCrate = "complex";
  113. window.playgroundUrl = "";
  114. </script>
  115. <script src="../jquery.js"></script>
  116. <script src="../main.js"></script>
  117. <script async src="../search-index.js"></script>
  118. </body>
  119. </html>