You have a comment
beside a line, which multiplies 2 doubles, and is returning zero. One of them must be zero. Have you tested to see which is zero, and what could cause that?