removed unnecessary sin/cos for sqdist