getReverseYBySlope static method

Offset getReverseYBySlope(
  1. double slope,
  2. Offset bOffset,
  3. double ax
)

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

Implementation

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