public double getModulus() { double square = MAL.Power(real, 2) + MAL.Power(imaginary, 2); double complement = MAL.SquareRoot(square, InstantiationDecimals); return(complement); }
private void Graph_Load(object sender, EventArgs e) { Width = ScreenWidth / CentreOfGraphScale - ScreenHeight / 4; Height = Width; Location = new Point(startingX, startingY); double[] scalingTest = new double[2]; double scalingTrial; switch (typeOfGraph) { case "MIDPOINT": scalingTest[0] = Values.Max(); scalingTest[1] = MAL.Modulus(Values.Min()); scalingTrial = scalingTest.Max(); significantFigures = MAL.Exponent(scalingTrial, ScaleBase); ScalingFactor = MAL.Power(ScaleBase, significantFigures); break; case "HALFLINE": scalingTest[0] = MAL.Modulus(Values[0]); scalingTest[1] = MAL.Modulus(Values[1]); scalingTrial = scalingTest.Max(); significantFigures = MAL.Exponent(scalingTrial, ScaleBase); ScalingFactor = MAL.Power(ScaleBase, significantFigures); break; case "CIRCLE": scalingTest[0] = MAL.Modulus(Values[0]); scalingTest[1] = MAL.Modulus(Values[1]); scalingTrial = scalingTest.Max() + Values[2]; significantFigures = MAL.Exponent(scalingTrial, ScaleBase); ScalingFactor = MAL.Power(ScaleBase, significantFigures); break; case "DISPLAY": scalingTest[0] = MAL.Modulus(Values[0]); scalingTest[1] = MAL.Modulus(Values[1]); scalingTrial = scalingTest.Max(); significantFigures = MAL.Exponent(scalingTrial, ScaleBase); ScalingFactor = MAL.Power(ScaleBase, significantFigures); break; } }