max method Null safety

void max(
  1. Vector2 a,
  2. Vector2 b,
  3. Vector2 result
)

Set the values of result to the maximum of a and b for each line.

Implementation

static void max(Vector2 a, Vector2 b, Vector2 result) {
  result
    ..x = math.max(a.x, b.x)
    ..y = math.max(a.y, b.y);
}