计算两个坐标的斜率值
static double calculateSlopeNotAbs(Offset pre, Offset next) { final diffWidth = next.dx - pre.dx; final diffHeight = next.dy - pre.dy; return diffWidth / diffHeight; }