ae.utils.geometry

2D geometry math stuff

Members

Enums

ShapeKind
enum ShapeKind

Discriminated union between Point, Rect or Circle.

Functions

circle
auto circle(T args)
Undocumented in source. Be warned that the author may not have intended to support it.
dist
auto dist(T x, T y)
Undocumented in source. Be warned that the author may not have intended to support it.
dist2
auto dist2(T x, T y)
Undocumented in source. Be warned that the author may not have intended to support it.
intersects
bool intersects(Shape!T a, Shape!T b)
bool intersects(Circle!T circle, Rect!T rect)

Intersection test.

point
auto point(T args)
Undocumented in source. Be warned that the author may not have intended to support it.
rect
auto rect(T args)
Undocumented in source. Be warned that the author may not have intended to support it.
shape
auto shape(T shape)
Undocumented in source. Be warned that the author may not have intended to support it.
sqrtx
auto sqrtx(T x)

sqrt disambiguation for integers.

Manifest constants

TAU
enum TAU;

τ=2π

Structs

Circle
struct Circle(T)

Circle on a plane.

Point
struct Point(T)

Point on a 2D plane.

Rect
struct Rect(T)

Orthogonal rectangle.

Shape
struct Shape(T)
Undocumented in source.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <ae@cy.md>