getReverseXBySlope static method

Offset getReverseXBySlope(
  1. double slope,
  2. Offset bOffset,
  3. double ay
)

斜率 = (bx - ax) / (by - ay) 逆推得到ax

Implementation

static Offset getReverseXBySlope(
    double slope, Offset bOffset /*bx, by*/, double ay) {
  final ax = bOffset.dx - slope * (bOffset.dy - ay);
  return Offset(ax, ay);
}