package oxbow

  1. Overview
  2. Docs
Dynamic window manager for the river Wayland compositor

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1.0.tar.gz
md5=a637acaa0e19046cd65fff733874eb97
sha512=76230cbecd7510de7a05b5d1f335915ef7b6c4aa557d8dbfd23591606618d2cfa25082d17b93f2f4b53a118d1cbf6a80e4ad51cf0f099b4921fb83d6df0c9801

doc/oxbow.core/Oxbow_core/Vector/index.html

Module Oxbow_core.VectorSource

Sourcetype t = {
  1. x : int;
  2. y : int;
}
Sourceval center : int Rect.t -> t

center r is the geometric center of r. Port of river-classic's Vector.positionOfBox.

Sourceval diff : t -> t -> t

diff a b is b - a.

Sourceval direction : t -> Direction.Spatial.t option

direction v classifies v into one of four quadrants by dominant axis: |dy| > |dx| is up/down, else left/right. Is None for the zero vector.

Sourceval length_squared : t -> int

length_squared v is x*x + y*y.

Sourceval nearest_in_direction : from:t -> dir:Direction.Spatial.t -> ('a -> t option) -> 'a list -> 'a option

nearest_in_direction ~from ~dir project xs is the element of xs closest to from in direction dir, or None if none qualifies. project x returns Some then candidate's center, or None to exclude x from the search.