CheckCollisionPointLine method

  1. @override
bool CheckCollisionPointLine(
  1. Vector2D point,
  2. Vector2D p1,
  3. Vector2D p2,
  4. int threshold,
)
override

Check if point belongs to line created between two points p1 and p2 with defined margin in pixels threshold

Implementation

@override
bool CheckCollisionPointLine(
  Vector2D point,
  Vector2D p1,
  Vector2D p2,
  int threshold,
) => _ffi.CheckCollisionPointLine(
  $.Vector2$.Ref1(point).asNativePointer<Vector2C>().ref,
  $.Vector2$.Ref2(p1).asNativePointer<Vector2C>().ref,
  $.Vector2$.Ref3(p2).asNativePointer<Vector2C>().ref,
  threshold,
);