"""
Vector Class for SI@UCF
5/15/13
Sawyer Hood
"""
import math

class Math_Vector:


	def __init__(self,x,y):
		self.x = x
		self.y = y

	def get_magnitude(self):
		return math.sqrt(pow(self.x,2)+pow(self.y,2))

	def mult_scalar(self,c):
		self.x *= c
		self.y *= c

	def negate(self):
		self.mult_scalar(-1)

	def __str__(self):
		return str(self.x)+"i + "+str(self.y)+"j"

	def __eq__(self, other):
		if self.x == other.x and self.y == other.y:
			return True
		else:
			return False

def main():
	x = float(input("Enter the x coordinate of your vector.\n"))
	y = float(input("Enter the y coordinate of your vector.\n"))
	
	my_vector = Math_Vector(x, y)
	print("My vector is", my_vector)
	print("It has a magnitude of",my_vector.get_magnitude())

	my_vector.mult_scalar(2)
	print("Now I had doubled the vector:", my_vector)

	my_vector.negate()
	print("Now I have negated the vector.", my_vector)

main()




