Changed (double)0 to 0.0. Added GPL header.