import math

class Vetor3D:

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

    def magnitude(self):
        return math.sqrt(self.x * self.x + self.y * self.y + self.z * self.z)

def produto_escalar(a, b):
    return a.x * b.x + a.y * b.y + a.z * b.z

def angulo(a, b):
    ta = a.magnitude()
    tb = b.magnitude()
    if ta == 0.0 or tb == 0.0:
        return 0.0
    return math.degrees(math.acos(produto_escalar(a, b) / ta / tb))

# Teste
a = Vetor3D(1, 0, 0)
b = Vetor3D(0, 1, 0)
print(angulo(a, b))
