Skip to content
Embercode
✕
GeometryQuick quiz

Cross products and exact tests

8 questions. Covers Orientation tests and exact arithmetic.

Questions 1 to 5 of 8

  1. 1. Take the points a = (1, 1), b = (3, 1) and c = (3, 4). What does the orientation test cross(b - a, c - a) give, and what kind of turn is it?
  2. 2. For a = (0, 0), b = (5, 1) and c = (2, 7), what is cross(b - a, c - a)? Give the integer.

    Type a number.

  3. 3. An AI tool wrote the orientation test with int variables. The input coordinates go up to 10^9 in absolute value. Which statement is true?
  4. 4. Which statements about the number types for the orientation test are true?

    Pick every answer that is true.

  5. 5. A polar-angle sort used atan2 with if (fabs(a - b) < 1e-9) return false;. The input has u = (10^9, 10^9 - 1) and v = (10^9 - 1, 10^9 - 2), in that order. The output keeps u first. What is the right diagnosis?

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.