Procs
func arg(p: Vec): float {....raises: [], tags: [].}
- Return vector argument in polar coordinate system Source Edit
func intersect(l1, l2: Line): Option[Vec] {....raises: [], tags: [].}
- Calculate point of intersection between two lines if any. Intersection is only counted if intersection point is between begin and end points for both lines. Intersections 'at infinity' does not count. Source Edit
func isNanOrInf(f: float): bool {....raises: [], tags: [].}
- Source Edit
func magnitude(p: Vec): float {....raises: [], tags: [].}
- Calculate magnitude of 2d vector Source Edit
func makeLine(a, b: Vec): Line {....raises: [], tags: [].}
- Create two lines using a, b as start/end point Source Edit
func makeLine(p: (Vec, Vec)): Line {....raises: [], tags: [].}
- Create two lines using (a, b) as start/end point Source Edit
proc makeVec3(x: float = 0.0; y: float = 0.0; z: float = 0.0): Vec3 {. ...raises: [], tags: [].}
- Source Edit
func moveAlong(l: Line; v: Vec; distance: float): Line {....raises: [], tags: [].}
- Move line in the direction of the vector by distance Source Edit
func rotate(v: Vec; a: float): Vec {....raises: [], tags: [].}
- CCW rotate vector by a radians Source Edit
func shiftNormal(l: Line; distance: float): Line {....raises: [], tags: [].}
- Move line by distance in the direction perpendicular to it's vector direction Source Edit