MCPcopy Create free account
hub / github.com/Apress/beginning-rust-2e / Complex

Class Complex

Source Code/19-24.rs:4–7  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2-2.3 + 0i, -2.1 - 5.2i, -2.2 + 5.2i*/
3fn main() {
4 struct Complex {
5 re: f64,
6 im: f64,
7 }
8 impl std::fmt::Display for Complex {
9 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
10 write!(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected