Commit b63a1eab authored by Elijah's avatar Elijah

commit

parent 1d204e95
No preview for this file type
No preview for this file type
No preview for this file type
// ignore
public class App {
public static void main(String[] args) throws Exception {
System.out.println("Hello, World!");
......
// the "mains"
import static org.junit.Assert.assertEquals;
import org.junit.Test;
......
// work out here
public class Complex {
public double real;
......@@ -27,13 +28,15 @@ public class Complex {
return real;
}
public double magnitude()
public double magnitude() // magnitude = sqrt(a^2 + b^2)
{
Math.sqrt(Math.pow(this.real,2) + Math.pow(this.imag,2));
return 1.0;
}
public double argument()
public double argument() // argument = tan-1(b/a)
{
//Math.atan2(b,a);
return 1.0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment