RaycastResult<T extends Hitbox<T>> constructor

RaycastResult<T extends Hitbox<T>>({
  1. T? hitbox,
  2. Ray2? reflectionRay,
  3. Vector2? normal,
  4. double? distance,
  5. bool isInsideHitbox = false,
})

Implementation

RaycastResult({
  T? hitbox,
  Ray2? reflectionRay,
  Vector2? normal,
  double? distance,
  bool isInsideHitbox = false,
})  : _isInsideHitbox = isInsideHitbox,
      _hitbox = hitbox,
      _reflectionRay = reflectionRay ?? Ray2.zero(),
      _normal = normal ?? Vector2.zero(),
      _distance = distance ?? double.maxFinite;