Documentation

Moser.Geometry.RationalPoint

Rational Points #

This file defines rational points in the plane and basic geometric operations on them.

@[reducible, inline]

A point in the plane with rational coordinates

Equations
Instances For

    Squared distance between two points (avoids square roots)

    Equations
    Instances For

      Cross product of two 2D vectors (returns scalar)

      Equations
      Instances For

        Dot product of two 2D vectors

        Equations
        Instances For

          Euclidean length squared of a vector

          Equations
          Instances For

            Check if a point is strictly to the left of the directed line from p1 to p2. Uses the cross product: positive means left, negative means right, zero means collinear.

            Equations
            Instances For

              Check if three points are in counterclockwise order

              Equations
              Instances For

                Rotate a rational point by 90° counterclockwise about the origin.

                Equations
                Instances For