PiMath API
    Preparing search index...

    Interface RandomGeometryPointConfig

    Options of rndPoint.

    interface RandomGeometryPointConfig {
        allow?: { origin?: boolean };
        axis?: boolean | "x" | "y" | null;
        fraction?: boolean | RandomCoefficientConfig;
        quadrant?: Quadrant | Quadrant[] | null;
        range?: RandomRange;
    }
    Index
    allow?: { origin?: boolean }

    Type Declaration

    • Optionalorigin?: boolean

      false excludes the point (0, 0) (default true).

    axis?: boolean | "x" | "y" | null

    Where the point lies relative to the axes (default null).

    • 'x': on the x-axis (y = 0); 'y': on the y-axis (x = 0).
    • true: on one of the two axes, chosen at random.
    • false: on no axis (no coordinate is zero).
    • null: unconstrained (a coordinate may be zero).
    fraction?: boolean | RandomCoefficientConfig

    false (default): integer coordinates; true: fractions; object: full control over the fractions.

    quadrant?: Quadrant | Quadrant[] | null

    Restricts the point to one quadrant, or to a union of quadrants (default null). Axes belong to the quadrants: quadrant 1 means x >= 0 and y >= 0. With several quadrants, one of them is chosen uniformly, then the point is drawn in it.

    range?: RandomRange

    Interval of the coordinates (default 10). A number d means [-|d|, |d|] (so 10 and -10 are equivalent); {min, max} gives explicit bounds.