private static double Dot(Grad g, double x, double y, double z) { return(g.x * x + g.y * y + g.z * z); }
private static double Dot(Grad g, double x, double y, double z, double w) { return(g.x * x + g.y * y + g.z * z + g.w * w); }
private static double Dot(Grad g, double x, double y) { return(g.x * x + g.y * y); }