My current implementation is
function angle(a, b) return acosd(a⋅b/(norm(a)*norm(b))) end
But, sometimes, it throws domain error as
LoadError: DomainError with 1.0000000000000002: acos(x) not defined for |x| > 1
Is there any inbuilt function that provides such functionality? Or is there any method to ensure that
a⋅b/(norm(a)*norm(b)) stays within [-1, 1]?