package geoml

  1. Overview
  2. Docs

Module PointSource

Module for 2d points manipulation

Sourcetype t = {
  1. x : float;
  2. y : float;
}
Sourceval make : float -> float -> t
Sourceval (%) : float -> float -> t
Sourcemodule Tbl : Hashtbl.S with type key = t
Sourceval orig : t

the point {x=0.; y=0.}

Sourceval center : t -> t -> t
Sourceval determinant : t -> t -> t -> float
Sourceval iso_barycenter : t list -> t
Sourceval barycenter : (t * float) list -> t
Sourceval sq_distance : t -> t -> float

square distance between two points

Sourceval distance : t -> t -> float

distance

Sourceval x_coord : t -> float
Sourceval y_coord : t -> float
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 reflection : t -> t -> t

point reflection. reflection p1 p2 returns the symerical point of p2 with respect to p1

Sourceval rotate : t -> t -> float -> t

point rotation. rotate p1 p2 f returns the rotation point of p2 with p1 as center and f a angle in radian

Sourceval rotate_angle : t -> t -> float -> t

point rotation. rotate p1 p2 f returns the rotation point of p2 with p1 as center and f a angle in degree

Sourceval print : Format.formatter -> t -> unit

printer

OCaml

Innovation. Community. Security.