Function which return third side from two side of triangle and corner between them

For this function I used external function written by Enrique Gonzalez for converting degrees to radian (http://phpjs.org/functions/deg2rad/).
// I am not proud with that long function name, but in this case it explaining exactly what it does.
function find_third_side_from_two_side_with_corner(a, b, y) {
    return Math.log((Math.pow(a,2) + Math.pow(b,2)) -2*a*b*Math.cos(deg2rad(y)));
}

// example how to use it.
find_third_side_from_two_side_with_corner(4,8,90);