package geoml

  1. Overview
  2. Docs

Module SegmentSource

Segment manipulation

Sourceval make : Point.t -> Point.t -> t
Sourcemodule Tbl : Hashtbl.S with type key = t
Sourceval extr1 : t -> Point.t
Sourceval extr2 : t -> Point.t
Sourceval center : t -> Point.t
Sourceval equation : t -> float -> Point.t
Sourceval sq_size : t -> float

returns the square size of a segment

Sourceval size : t -> float

returns the size of a segment

Sourceval scale_x : t -> float -> t
Sourceval scale_y : t -> float -> t
Sourceval translate : float -> float -> t -> t
Sourceval transform : Affine.t -> t -> t
Sourceval to_line : t -> Line.t
Sourceval contains : t -> Point.t -> bool
Sourceval proj_x : t -> float * float
Sourceval proj_y : t -> float * float
Sourceval intersects : t -> t -> bool

intersects a b, returns true if a and b intersect. false otherwise

Sourceval intersection : t -> t -> Point.t option

returns the intersection point of two segments. returns None if they don't intersect

Sourceval intersect_line : t -> Line.t -> Point.t option

returns the intersection point of a segment and a line. returns None if they don't intersect

OCaml

Innovation. Community. Security.