Skip to content

Commit

Permalink
Rust mini update - not working
Browse files Browse the repository at this point in the history
  • Loading branch information
x10an14 committed Dec 10, 2017
1 parent 367bc8d commit aab046e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
10 changes: 5 additions & 5 deletions imaginary_numbers/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "hello_world"
version = "0.0.1"
authors = [
"Christian Chavez <[email protected]>"
]
version = "0.1.0"
authors = ["x10an14 <[email protected]>"]

[dependencies]
num = "0.1.40"
30 changes: 30 additions & 0 deletions imaginary_numbers/rust/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
extern crate num;
use num::Float;

pub struct Complex<T> {
pub re: T,
pub im: T,
}

impl<T: Clone> Complex<T> {
fn new(re: T, im: T) -> Complex<T> {
unimplemented!();
}

fn i() -> Complex<T> {
unimplemented!();
}

fn scale(&self, factor: T) -> Complex<T> {
unimplemented!();
}

fn unscale(&self, factor: T) -> Complex<T> {
unimplemented!();
}



}


fn main() {
println!("Hello, world!");
}

0 comments on commit aab046e

Please sign in to comment.