package
0.0.0-20241212192544-4710020385f1
Repository: https://github.com/hackborn/onefunc.git
Documentation: pkg.go.dev

# README

geo

A collection of geometry primitives.

Why would you use this? You wouldn't. There are so many good math libraries. This is not one of them.

# Functions

Bez is shorthand for creating a quadratic bezier curve.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CubicBez is shorthand for creating a cubic bezier curve.
CubicBezierDistance approximates the distance from a point to a Bezier curve.
CubicBezierDistanceSquared approximates the distance from a point to a Bezier curve.
DegreesToDirectionCcw converts degrees to a direction vector, where 0 = right and it continues clockwise, so 90 is down.
No description provided by the author
DistPointToSegment answers the distance from the point to the segment, as well as the point found on the segment.
DistSquared answers the squared distance from the point to the segment, as well as the point found on the segment.
No description provided by the author
FindIntersection finds the intersection between two line segments.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IndexToXY converts a flat index into an array into an XY position.
IsCollinear checks if three points are collinear.
From direction vector v and offset c.
From points P and Q.
From points P and Q as XYs.
LineLineIntersectionF provides the intersection of two lines.
No description provided by the author
https://stackoverflow.com/questions/34415671/intersection-of-a-line-with-a-line-segment-in-c line segment p-q intersect with line A-B.
No description provided by the author
Surely these are SOMEWHERE? TODO: Yes, builtin min() and max(), and they are highly optimized, perform the same as this.
No description provided by the author
OnSegment checks if a point lies on a line segment.
Orient answers whether C is left / clockwise to direct segment AB.
PerpendicularIntersection finds the intersection of point to the line segment by drawing a perpendicular line from point to segment.
No description provided by the author
No description provided by the author
Pt is shorthand for creating a point from two values.
Pt3d is shorthand for creating a point3d from three values.
No description provided by the author
No description provided by the author
Pts creates a slice of Points from x y values.
No description provided by the author
No description provided by the author
No description provided by the author
QuadraticBez is shorthand for creating a quadratic bezier curve.
QuadraticBezierDistanceBrute approximates the distance from a point to a Bezier curve.
QuadraticBezierDistanceSquared approximates the distance from a point to a Bezier curve.
QuadraticBezierDistanceSquaredBrute approximates the distance from a point to a Bezier curve.
RadialDist answers the distance between two unit values, accounting for wrapping.
No description provided by the author
Ratio answers a 0-1 value based on a's contributing factor to the final value.
No description provided by the author
No description provided by the author
No description provided by the author
Seg is shorthand for creating a segment from two points.
No description provided by the author
Tri3d is shorthand for creating a triangle.
No description provided by the author
No description provided by the author
No description provided by the author
Proiject a ray perpendicular to triPt on tri to find its intersection with the plane (as defined by planeTri and planePt).
XAtY answers the X value for this segment at the given Y value, or false if the line does not intersect y.
XYToIndex converts an X, Y to a flat index.
XYToIndexFast converts an X, Y to a flat index without any bounds checking.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
CubicBezier represents a cubic Bezier curve.
https://github.com/vlecomte/cp-geo/blob/master/basics/line.tex.
No description provided by the author
No description provided by the author
No description provided by the author
PolygonBB is a closed polygon that includes the computed bounding box.
QuadraticBezier represents a quadratic Bezier curve.
No description provided by the author
No description provided by the author
No description provided by the author
Segment represents a line segment with start and end points.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
HitTest answers true if the point is a hit.
No description provided by the author
No description provided by the author
No description provided by the author