src/vmath

    Dark Mode
Search:
Group by:
  Source   Edit

Your one stop shop for vector math routines for 2d and 3d graphics.

  • Pure Nim with no dependencies.
  • Very similar to GLSL Shader Language with extra stuff.
  • Extensively benchmarked.
TypeConstructorDescription
BVec#bvec#vector of booleans
IVec#ivec#vector of signed integers
UVec#uvec#vector of unsigned integers
Vec#vec#vector of single-precision floating-point numbers
DVec#dvec#vector of double-precision floating-point numbers

You can use these constructors to make them:

NIMGLSL2349164
boolboolBVec2BVec3BVec4
int32intIVec2IVec3IVec4
uint32uintUVec2UVec3UVec4
float32floatVec2Vec3Vec4Mat3Mat4Quat
float64doubleDVec2DVec3DVec4DMat3DMat4DQuat

Types

BVec2 = GVec2[bool]
  Source   Edit
BVec3 = GVec3[bool]
  Source   Edit
BVec4 = GVec4[bool]
  Source   Edit
DMat2 = GMat2[float64]
  Source   Edit
DMat3 = GMat3[float64]
  Source   Edit
DMat4 = GMat4[float64]
  Source   Edit
DQuat = GVec4[float64]
  Source   Edit
DVec2 = GVec2[float64]
  Source   Edit
DVec3 = GVec3[float64]
  Source   Edit
DVec4 = GVec4[float64]
  Source   Edit
GMat2[T] {.bycopy.} = object
  arr: array[4, T]
  Source   Edit
GMat3[T] {.bycopy.} = object
  arr: array[9, T]
  Source   Edit
GMat4[T] {.bycopy.} = object
  arr: array[16, T]
  Source   Edit
GVec2[T] = object
  arr: array[2, T]
  Source   Edit
GVec3[T] = object
  arr: array[3, T]
  Source   Edit
GVec4[T] = object
  arr: array[4, T]
  Source   Edit
IVec2 = GVec2[int32]
  Source   Edit
IVec3 = GVec3[int32]
  Source   Edit
IVec4 = GVec4[int32]
  Source   Edit
Mat2 = GMat2[float32]
  Source   Edit
Mat3 = GMat3[float32]
  Source   Edit
Mat4 = GMat4[float32]
  Source   Edit
Quat = GVec4[float32]
  Source   Edit
UVec2 = GVec2[uint32]
  Source   Edit
UVec3 = GVec3[uint32]
  Source   Edit
UVec4 = GVec4[uint32]
  Source   Edit
Vec2 = GVec2[float32]
  Source   Edit
Vec3 = GVec3[float32]
  Source   Edit
Vec4 = GVec4[float32]
  Source   Edit

Procs

proc `!=`[T](a, b: GVec2[T]): bool {.inline.}
  Source   Edit
proc `!=`[T](a, b: GVec3[T]): bool {.inline.}
  Source   Edit
proc `!=`[T](a, b: GVec4[T]): bool {.inline.}
  Source   Edit
proc `$`(a`gensym6: BVec2): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym6: BVec3): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym6: BVec4): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym28: IVec2): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym28: IVec3): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym28: IVec4): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym50: UVec2): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym50: UVec3): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym50: UVec4): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym72: Vec2): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym72: Vec3): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym72: Vec4): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym94: DVec2): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym94: DVec3): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym94: DVec4): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym247: Mat2): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym247: Mat3): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym247: Mat4): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym309: DMat2): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym309: DMat3): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `$`(a`gensym309: DMat4): string {.inline, ...raises: [], tags: [].}
  Source   Edit
proc `*=`[T](a`gensym161: var GVec2[T]; b`gensym161: GVec2[T]) {.inline.}
  Source   Edit
proc `*=`[T](a`gensym161: var GVec2[T]; b`gensym161: T) {.inline.}
  Source   Edit
proc `*=`[T](a`gensym161: var GVec3[T]; b`gensym161: GVec3[T]) {.inline.}
  Source   Edit
proc `*=`[T](a`gensym161: var GVec3[T]; b`gensym161: T) {.inline.}
  Source   Edit
proc `*=`[T](a`gensym161: var GVec4[T]; b`gensym161: GVec4[T]) {.inline.}
  Source   Edit
proc `*=`[T](a`gensym161: var GVec4[T]; b`gensym161: T) {.inline.}
  Source   Edit
proc `*`[T](a, b: GMat3[T]): GMat3[T] {.inline.}
  Source   Edit
proc `*`[T](a, b: GMat4[T]): GMat4[T] {.inline.}
  Source   Edit
proc `*`[T](a: GMat2[T]; b: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `*`[T](a: GMat3[T]; b: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `*`[T](a: GMat3[T]; b: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `*`[T](a: GMat4[T]; b: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `*`[T](a: GMat4[T]; b: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `*`[T](a`gensym154, b`gensym154: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `*`[T](a`gensym154, b`gensym154: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `*`[T](a`gensym154, b`gensym154: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `*`[T](a`gensym154: GVec2[T]; b`gensym154: T): GVec2[T] {.inline.}
  Source   Edit
proc `*`[T](a`gensym154: GVec3[T]; b`gensym154: T): GVec3[T] {.inline.}
  Source   Edit
proc `*`[T](a`gensym154: GVec4[T]; b`gensym154: T): GVec4[T] {.inline.}
  Source   Edit
proc `*`[T](a`gensym154: T; b`gensym154: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `*`[T](a`gensym154: T; b`gensym154: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `*`[T](a`gensym154: T; b`gensym154: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `+=`[T](a`gensym159: var GVec2[T]; b`gensym159: GVec2[T]) {.inline.}
  Source   Edit
proc `+=`[T](a`gensym159: var GVec2[T]; b`gensym159: T) {.inline.}
  Source   Edit
proc `+=`[T](a`gensym159: var GVec3[T]; b`gensym159: GVec3[T]) {.inline.}
  Source   Edit
proc `+=`[T](a`gensym159: var GVec3[T]; b`gensym159: T) {.inline.}
  Source   Edit
proc `+=`[T](a`gensym159: var GVec4[T]; b`gensym159: GVec4[T]) {.inline.}
  Source   Edit
proc `+=`[T](a`gensym159: var GVec4[T]; b`gensym159: T) {.inline.}
  Source   Edit
proc `+`[T](a`gensym152, b`gensym152: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `+`[T](a`gensym152, b`gensym152: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `+`[T](a`gensym152, b`gensym152: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `+`[T](a`gensym152: GVec2[T]; b`gensym152: T): GVec2[T] {.inline.}
  Source   Edit
proc `+`[T](a`gensym152: GVec3[T]; b`gensym152: T): GVec3[T] {.inline.}
  Source   Edit
proc `+`[T](a`gensym152: GVec4[T]; b`gensym152: T): GVec4[T] {.inline.}
  Source   Edit
proc `+`[T](a`gensym152: T; b`gensym152: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `+`[T](a`gensym152: T; b`gensym152: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `+`[T](a`gensym152: T; b`gensym152: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `-=`[T](a`gensym160: var GVec2[T]; b`gensym160: GVec2[T]) {.inline.}
  Source   Edit
proc `-=`[T](a`gensym160: var GVec2[T]; b`gensym160: T) {.inline.}
  Source   Edit
proc `-=`[T](a`gensym160: var GVec3[T]; b`gensym160: GVec3[T]) {.inline.}
  Source   Edit
proc `-=`[T](a`gensym160: var GVec3[T]; b`gensym160: T) {.inline.}
  Source   Edit
proc `-=`[T](a`gensym160: var GVec4[T]; b`gensym160: GVec4[T]) {.inline.}
  Source   Edit
proc `-=`[T](a`gensym160: var GVec4[T]; b`gensym160: T) {.inline.}
  Source   Edit
proc `-`[T](a`gensym153, b`gensym153: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `-`[T](a`gensym153, b`gensym153: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `-`[T](a`gensym153, b`gensym153: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `-`[T](a`gensym153: GVec2[T]; b`gensym153: T): GVec2[T] {.inline.}
  Source   Edit
proc `-`[T](a`gensym153: GVec3[T]; b`gensym153: T): GVec3[T] {.inline.}
  Source   Edit
proc `-`[T](a`gensym153: GVec4[T]; b`gensym153: T): GVec4[T] {.inline.}
  Source   Edit
proc `-`[T](a`gensym153: T; b`gensym153: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `-`[T](a`gensym153: T; b`gensym153: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `-`[T](a`gensym153: T; b`gensym153: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `-`[T](v`gensym163: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `-`[T](v`gensym163: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `-`[T](v`gensym163: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `/=`[T](a`gensym162: var GVec2[T]; b`gensym162: GVec2[T]) {.inline.}
  Source   Edit
proc `/=`[T](a`gensym162: var GVec2[T]; b`gensym162: T) {.inline.}
  Source   Edit
proc `/=`[T](a`gensym162: var GVec3[T]; b`gensym162: GVec3[T]) {.inline.}
  Source   Edit
proc `/=`[T](a`gensym162: var GVec3[T]; b`gensym162: T) {.inline.}
  Source   Edit
proc `/=`[T](a`gensym162: var GVec4[T]; b`gensym162: GVec4[T]) {.inline.}
  Source   Edit
proc `/=`[T](a`gensym162: var GVec4[T]; b`gensym162: T) {.inline.}
  Source   Edit
proc `/`[T](a`gensym155, b`gensym155: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `/`[T](a`gensym155, b`gensym155: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `/`[T](a`gensym155, b`gensym155: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `/`[T](a`gensym155: GVec2[T]; b`gensym155: T): GVec2[T] {.inline.}
  Source   Edit
proc `/`[T](a`gensym155: GVec3[T]; b`gensym155: T): GVec3[T] {.inline.}
  Source   Edit
proc `/`[T](a`gensym155: GVec4[T]; b`gensym155: T): GVec4[T] {.inline.}
  Source   Edit
proc `/`[T](a`gensym155: T; b`gensym155: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `/`[T](a`gensym155: T; b`gensym155: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `/`[T](a`gensym155: T; b`gensym155: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `==`[T](a, b: GVec2[T]): bool {.inline.}
  Source   Edit
proc `==`[T](a, b: GVec3[T]): bool {.inline.}
  Source   Edit
proc `==`[T](a, b: GVec4[T]): bool {.inline.}
  Source   Edit
proc `div`[T](a`gensym157, b`gensym157: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `div`[T](a`gensym157, b`gensym157: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `div`[T](a`gensym157, b`gensym157: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `div`[T](a`gensym157: GVec2[T]; b`gensym157: T): GVec2[T] {.inline.}
  Source   Edit
proc `div`[T](a`gensym157: GVec3[T]; b`gensym157: T): GVec3[T] {.inline.}
  Source   Edit
proc `div`[T](a`gensym157: GVec4[T]; b`gensym157: T): GVec4[T] {.inline.}
  Source   Edit
proc `div`[T](a`gensym157: T; b`gensym157: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `div`[T](a`gensym157: T; b`gensym157: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `div`[T](a`gensym157: T; b`gensym157: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `mod`[T](a`gensym156, b`gensym156: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `mod`[T](a`gensym156, b`gensym156: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `mod`[T](a`gensym156, b`gensym156: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `mod`[T](a`gensym156: GVec2[T]; b`gensym156: T): GVec2[T] {.inline.}
  Source   Edit
proc `mod`[T](a`gensym156: GVec3[T]; b`gensym156: T): GVec3[T] {.inline.}
  Source   Edit
proc `mod`[T](a`gensym156: GVec4[T]; b`gensym156: T): GVec4[T] {.inline.}
  Source   Edit
proc `mod`[T](a`gensym156: T; b`gensym156: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc `mod`[T](a`gensym156: T; b`gensym156: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc `mod`[T](a`gensym156: T; b`gensym156: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc `~=`[T: SomeFloat](a, b: T): bool {.inline.}
Almost equal.   Source   Edit
proc `~=`[T](a, b: GMat2[T]): bool {.inline.}
  Source   Edit
proc `~=`[T](a, b: GMat3[T]): bool {.inline.}
  Source   Edit
proc `~=`[T](a, b: GMat4[T]): bool {.inline.}
  Source   Edit
proc `~=`[T](a, b: GVec2[T]): bool {.inline.}
Almost equal.   Source   Edit
proc `~=`[T](a, b: GVec3[T]): bool {.inline.}
Almost equal.   Source   Edit
proc `~=`[T](a, b: GVec4[T]): bool {.inline.}
Almost equal.   Source   Edit
proc abs[T](v`gensym181: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc abs[T](v`gensym181: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc abs[T](v`gensym181: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc angle[T](a, b: GVec2[T]): T {.inline.}
Angle between 2 Vec2.   Source   Edit
proc angle[T](a, b: GVec3[T]): T {.inline.}
Angle between 2 Vec3.   Source   Edit
proc angle[T](a: GVec2[T]): T {.inline.}
Angle of a Vec2.   Source   Edit
proc angleBetween[T: SomeFloat](a, b: T): T {.inline.}
Angle between angle a and angle b. All angles assume radians.   Source   Edit
proc arccos[T](v`gensym168: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc arccos[T](v`gensym168: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc arccos[T](v`gensym168: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc arcsin[T](v`gensym167: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc arcsin[T](v`gensym167: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc arcsin[T](v`gensym167: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc arctan[T](v`gensym169: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc arctan[T](v`gensym169: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc arctan[T](v`gensym169: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc back[T](a: GMat4[T]): GVec3[T] {.inline, inline.}
Vector facing -Z.   Source   Edit
proc between[T](value, min, max: T): bool {.inline.}
Returns true if value is between min and max or equal to them.   Source   Edit
proc bvec2(): BVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc bvec2(x`gensym6, y`gensym6: bool): BVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc bvec2(x`gensym6: bool): BVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc bvec2[T](x`gensym6: GVec2[T]): BVec2 {.inline.}
  Source   Edit
proc bvec3(): BVec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc bvec3(x`gensym6, y`gensym6, z`gensym6: bool): BVec3 {.inline, ...raises: [],
    tags: [].}
  Source   Edit
proc bvec3(x`gensym6: bool): BVec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc bvec3[T](x`gensym6: GVec2[T]; z`gensym6: T = 0): BVec3 {.inline.}
  Source   Edit
proc bvec3[T](x`gensym6: GVec3[T]): BVec3 {.inline.}
  Source   Edit
proc bvec4(): BVec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc bvec4(x`gensym6, y`gensym6, z`gensym6, w`gensym6: bool): BVec4 {.inline,
    ...raises: [], tags: [].}
  Source   Edit
proc bvec4(x`gensym6: bool): BVec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc bvec4[T](a`gensym6, b`gensym6: GVec2[T]): BVec4 {.inline.}
  Source   Edit
proc bvec4[T](x`gensym6: GVec3[T]; w`gensym6: T = 0): BVec4 {.inline.}
  Source   Edit
proc bvec4[T](x`gensym6: GVec4[T]): BVec4 {.inline.}
  Source   Edit
proc ceil[T](v`gensym180: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc ceil[T](v`gensym180: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc ceil[T](v`gensym180: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc cos[T](v`gensym165: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc cos[T](v`gensym165: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc cos[T](v`gensym165: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc cosh[T](v`gensym171: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc cosh[T](v`gensym171: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc cosh[T](v`gensym171: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc cross[T](a, b: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc determinant[T](a: GMat3[T]): T {.inline.}
Compute a determinant of the matrix.   Source   Edit
proc determinant[T](a: GMat4[T]): T {.inline.}
Compute a determinant of the matrix.   Source   Edit
proc dir[T](angle: T): GVec2[T] {.inline.}
  Source   Edit
proc dir[T](at, to: GVec234[T]): type(to) {.inline.}
  Source   Edit
proc dist[T](at, to: GVec234[T]): T {.inline.}
  Source   Edit
proc distSq[T](at, to: GVec234[T]): T {.inline.}
  Source   Edit
proc dmat2(): DMat2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dmat2(a`gensym309, b`gensym309: GVec2[float64]): DMat2 {.inline,
    ...raises: [], tags: [].}
  Source   Edit
proc dmat2(m00`gensym309, m01`gensym309, m10`gensym309, m11`gensym309: float64): DMat2 {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc dmat3(): DMat3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dmat3(a`gensym309, b`gensym309, c`gensym309: GVec3[float64]): DMat3 {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc dmat3(m00`gensym309, m01`gensym309, m02`gensym309, m10`gensym309,
           m11`gensym309, m12`gensym309, m20`gensym309, m21`gensym309,
           m22`gensym309: float64): DMat3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dmat4(): DMat4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dmat4(a`gensym309, b`gensym309, c`gensym309, d`gensym309: GVec4[float64]): DMat4 {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc dmat4(m00`gensym309, m01`gensym309, m02`gensym309, m03`gensym309,
           m10`gensym309, m11`gensym309, m12`gensym309, m13`gensym309,
           m20`gensym309, m21`gensym309, m22`gensym309, m23`gensym309,
           m30`gensym309, m31`gensym309, m32`gensym309, m33`gensym309: float64): DMat4 {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc dot[T](a, b: GVec2[T]): T {.inline.}
  Source   Edit
proc dot[T](a, b: GVec3[T]): T {.inline.}
  Source   Edit
proc dot[T](a, b: GVec4[T]): T {.inline.}
  Source   Edit
proc down[T](a: GMat4[T]): GVec3[T] {.inline, inline.}
Vector facing -X.   Source   Edit
proc dquat(): DQuat {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dquat(x`gensym376, y`gensym376, z`gensym376, w`gensym376: float64): DQuat {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc dquat(x`gensym376: float64): DQuat {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dquat[T](x`gensym376: GVec4[T]): DQuat {.inline.}
  Source   Edit
proc dvec2(): DVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dvec2(x`gensym94, y`gensym94: float64): DVec2 {.inline, ...raises: [],
    tags: [].}
  Source   Edit
proc dvec2(x`gensym94: float64): DVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dvec2[T](x`gensym94: GVec2[T]): DVec2 {.inline.}
  Source   Edit
proc dvec3(): DVec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dvec3(x`gensym94, y`gensym94, z`gensym94: float64): DVec3 {.inline,
    ...raises: [], tags: [].}
  Source   Edit
proc dvec3(x`gensym94: float64): DVec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dvec3[T](x`gensym94: GVec2[T]; z`gensym94: T = 0): DVec3 {.inline.}
  Source   Edit
proc dvec3[T](x`gensym94: GVec3[T]): DVec3 {.inline.}
  Source   Edit
proc dvec4(): DVec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dvec4(x`gensym94, y`gensym94, z`gensym94, w`gensym94: float64): DVec4 {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc dvec4(x`gensym94: float64): DVec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc dvec4[T](a`gensym94, b`gensym94: GVec2[T]): DVec4 {.inline.}
  Source   Edit
proc dvec4[T](x`gensym94: GVec3[T]; w`gensym94: T = 0): DVec4 {.inline.}
  Source   Edit
proc dvec4[T](x`gensym94: GVec4[T]): DVec4 {.inline.}
  Source   Edit
proc equal[T](a`gensym209, b`gensym209: GVec2[T]): BVec2 {.inline.}
  Source   Edit
proc equal[T](a`gensym209, b`gensym209: GVec3[T]): BVec3 {.inline.}
  Source   Edit
proc equal[T](a`gensym209, b`gensym209: GVec4[T]): BVec4 {.inline.}
  Source   Edit
proc exp2[T](v`gensym173: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc exp2[T](v`gensym173: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc exp2[T](v`gensym173: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc exp[T](v`gensym175: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc exp[T](v`gensym175: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc exp[T](v`gensym175: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc fixAngle[T: SomeFloat](angle: T): T {.inline.}
Normalize the angle to be from -PI to PI radians.   Source   Edit
proc floor[T](v`gensym179: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc floor[T](v`gensym179: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc floor[T](v`gensym179: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc forward[T](a: GMat4[T]): GVec3[T] {.inline, inline.}
Vector facing +Z.   Source   Edit
proc fract[T: SomeFloat](v: T): T {.inline.}
Returns fractional part of a number. 3.14 -> 0.14
-3.14 -> 0.14
  Source   Edit
proc fract[T](v`gensym183: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc fract[T](v`gensym183: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc fract[T](v`gensym183: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc fractional[T: SomeFloat](v: T): T {....deprecated: "Use frac() insetad",
    inline.}
Deprecated: Use frac() insetad
Returns fractional part of a number.   Source   Edit
proc fromAngles[T](a: GVec3[T]): GMat4[T] {.inline.}
Takes a vector containing Euler angles and returns a matrix. All angles assume radians.   Source   Edit
proc fromAxisAngle[T](axis: GVec3[T]; angle: T): GVec4[T] {.inline.}
Create a quaternion from axis and angle.   Source   Edit
proc fromTwoVectors[T](a, b: GVec3[T]): GVec4[T] {.inline.}
Return a quat that would take a and rotate it into b.   Source   Edit
proc frustum[T](left, right, bottom, top, near, far: T): GMat4[T] {.inline.}
Create a frustum matrix.   Source   Edit
proc gmat2[T](m00, m01, m10, m11: T): GMat2[T] {.inline.}
  Source   Edit
proc gmat3[T](m00, m01, m02, m10, m11, m12, m20, m21, m22: T): GMat3[T] {.inline.}
  Source   Edit
proc gmat4[T](m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30,
              m31, m32, m33: T): GMat4[T] {.inline.}
  Source   Edit
proc greaterThan[T](a`gensym189, b`gensym189: GVec2[T]): BVec2 {.inline.}
  Source   Edit
proc greaterThan[T](a`gensym189, b`gensym189: GVec3[T]): BVec3 {.inline.}
  Source   Edit
proc greaterThan[T](a`gensym189, b`gensym189: GVec4[T]): BVec4 {.inline.}
  Source   Edit
proc greaterThanEqual[T](a`gensym199, b`gensym199: GVec2[T]): BVec2 {.inline.}
  Source   Edit
proc greaterThanEqual[T](a`gensym199, b`gensym199: GVec3[T]): BVec3 {.inline.}
  Source   Edit
proc greaterThanEqual[T](a`gensym199, b`gensym199: GVec4[T]): BVec4 {.inline.}
  Source   Edit
proc inverse[T](a: GMat3[T]): GMat3[T] {.inline.}
Return an inverse of the matrix.   Source   Edit
proc inverse[T](a: GMat4[T]): GMat4[T] {.inline.}
Return an inverse of the matrix.   Source   Edit
proc inversesqrt[T: float32 | float64](v: T): T {.inline.}
Returns inverse square root.   Source   Edit
proc inversesqrt[T](v`gensym174: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc inversesqrt[T](v`gensym174: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc inversesqrt[T](v`gensym174: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc isNan(x: SomeFloat): bool {.inline.}
Returns true if number is a NaN.   Source   Edit
proc ivec2(): IVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc ivec2(uvec2: UVec2): IVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc ivec2(x`gensym28, y`gensym28: int32): IVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc ivec2(x`gensym28: int32): IVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc ivec2[T](x`gensym28: GVec2[T]): IVec2 {.inline.}
  Source   Edit
proc ivec3(): IVec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc ivec3(uvec3: UVec3): IVec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc ivec3(x`gensym28, y`gensym28, z`gensym28: int32): IVec3 {.inline,
    ...raises: [], tags: [].}
  Source   Edit
proc ivec3(x`gensym28: int32): IVec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc ivec3[T](x`gensym28: GVec2[T]; z`gensym28: T = 0): IVec3 {.inline.}
  Source   Edit
proc ivec3[T](x`gensym28: GVec3[T]): IVec3 {.inline.}
  Source   Edit
proc ivec4(): IVec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc ivec4(uvec4: UVec4): IVec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc ivec4(x`gensym28, y`gensym28, z`gensym28, w`gensym28: int32): IVec4 {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc ivec4(x`gensym28: int32): IVec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc ivec4[T](a`gensym28, b`gensym28: GVec2[T]): IVec4 {.inline.}
  Source   Edit
proc ivec4[T](x`gensym28: GVec3[T]; w`gensym28: T = 0): IVec4 {.inline.}
  Source   Edit
proc ivec4[T](x`gensym28: GVec4[T]): IVec4 {.inline.}
  Source   Edit
proc left[T](a: GMat4[T]): GVec3[T] {.inline, inline.}
Vector facing +X.   Source   Edit
proc length[T](a: GVec2[T]): T {.inline.}
  Source   Edit
proc length[T](a: GVec3[T]): T {.inline.}
  Source   Edit
proc length[T](a: GVec4[T]): T {.inline.}
  Source   Edit
proc lengthSq[T](a: GVec2[T]): T {.inline.}
  Source   Edit
proc lengthSq[T](a: GVec3[T]): T {.inline.}
  Source   Edit
proc lengthSq[T](a: GVec4[T]): T {.inline.}
  Source   Edit
proc lerp[V, T](a, b: V; v: T): type(a) {....deprecated: "use mix instead", inline.}
Deprecated: use mix instead
  Source   Edit
proc lessThan[T](a`gensym187, b`gensym187: GVec2[T]): BVec2 {.inline.}
  Source   Edit
proc lessThan[T](a`gensym187, b`gensym187: GVec3[T]): BVec3 {.inline.}
  Source   Edit
proc lessThan[T](a`gensym187, b`gensym187: GVec4[T]): BVec4 {.inline.}
  Source   Edit
proc lessThanEqual[T](a`gensym188, b`gensym188: GVec2[T]): BVec2 {.inline.}
  Source   Edit
proc lessThanEqual[T](a`gensym188, b`gensym188: GVec3[T]): BVec3 {.inline.}
  Source   Edit
proc lessThanEqual[T](a`gensym188, b`gensym188: GVec4[T]): BVec4 {.inline.}
  Source   Edit
proc ln[T](v`gensym176: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc ln[T](v`gensym176: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc ln[T](v`gensym176: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc log2[T](v`gensym177: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc log2[T](v`gensym177: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc log2[T](v`gensym177: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc lookAt[T](eye, center, up: GVec3[T]): GMat4[T] {....deprecated: "Wrong coordinate system. Use toAngles(eye, center).fromAngles() instead to get right-handed-z-forward coordinate system",
    inline.}
Deprecated: Wrong coordinate system. Use toAngles(eye, center).fromAngles() instead to get right-handed-z-forward coordinate system
Create a matrix that would convert eye pos to looking at center.   Source   Edit
proc lookAt[T](eye, center: GVec3[T]): GMat4[T] {....deprecated: "Wrong coordinate system. Use toAngles(eye, center).fromAngles() instead to get right-handed-z-forward coordinate system",
    inline.}
Deprecated: Wrong coordinate system. Use toAngles(eye, center).fromAngles() instead to get right-handed-z-forward coordinate system
Look center from eye with default UP vector.   Source   Edit
proc mat2(): Mat2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc mat2(a`gensym247, b`gensym247: GVec2[float32]): Mat2 {.inline, ...raises: [],
    tags: [].}
  Source   Edit
proc mat2(m00`gensym247, m01`gensym247, m10`gensym247, m11`gensym247: float32): Mat2 {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc mat3(): Mat3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc mat3(a`gensym247, b`gensym247, c`gensym247: GVec3[float32]): Mat3 {.inline,
    ...raises: [], tags: [].}
  Source   Edit
proc mat3(m00`gensym247, m01`gensym247, m02`gensym247, m10`gensym247,
          m11`gensym247, m12`gensym247, m20`gensym247, m21`gensym247,
          m22`gensym247: float32): Mat3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc mat4(): Mat4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc mat4(a`gensym247, b`gensym247, c`gensym247, d`gensym247: GVec4[float32]): Mat4 {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc mat4(m00`gensym247, m01`gensym247, m02`gensym247, m03`gensym247,
          m10`gensym247, m11`gensym247, m12`gensym247, m13`gensym247,
          m20`gensym247, m21`gensym247, m22`gensym247, m23`gensym247,
          m30`gensym247, m31`gensym247, m32`gensym247, m33`gensym247: float32): Mat4 {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc mat4[T](q: GVec4[T]): GMat4[T] {.inline.}
  Source   Edit
proc max(a, b: Vec2): Vec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc max(a, b: Vec3): Vec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc max(a, b: Vec4): Vec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc min(a, b: Vec2): Vec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc min(a, b: Vec3): Vec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc min(a, b: Vec4): Vec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc mix[T: SomeFloat](a, b, v: GVec2[T]): type(a) {.inline.}
  Source   Edit
proc mix[T: SomeFloat](a, b, v: GVec3[T]): type(a) {.inline.}
  Source   Edit
proc mix[T: SomeFloat](a, b, v: GVec4[T]): type(a) {.inline.}
  Source   Edit
proc mix[T: SomeFloat](a, b, v: T): T {.inline.}
Interpolates value between a and b.
  • 0 -> a
  • 1 -> b
  • 0.5 -> between a and b
  Source   Edit
proc mix[T: SomeFloat](a, b: GVec234[T]; v: T): type(a) {.inline.}
  Source   Edit
proc nlerp(a: Quat; b: Quat; v: float32): Quat {.inline, ...raises: [], tags: [].}
  Source   Edit
proc normalize[T](a: GVec234[T]): type(a) {.inline.}
  Source   Edit
proc notEqual[T](a`gensym210, b`gensym210: GVec2[T]): BVec2 {.inline.}
  Source   Edit
proc notEqual[T](a`gensym210, b`gensym210: GVec3[T]): BVec3 {.inline.}
  Source   Edit
proc notEqual[T](a`gensym210, b`gensym210: GVec4[T]): BVec4 {.inline.}
  Source   Edit
proc ortho[T](left, right, bottom, top, near, far: T): GMat4[T] {.inline.}
Create an orthographic matrix.   Source   Edit
proc orthogonal[T](v: GVec3[T]): GVec3[T] {.inline.}
Returns orthogonal vector to given vector.   Source   Edit
proc perspective[T](fovy, aspect, near, far: T): GMat4[T] {.inline.}
Create a perspective matrix.   Source   Edit
proc pos=[T](a: var GMat3[T]; pos: GVec2[T]) {.inline.}
  Source   Edit
proc pos=[T](a: var GMat4[T]; pos: GVec3[T]) {.inline.}
See the position of the matrix.   Source   Edit
proc pos[T](a: GMat3[T]): GVec2[T] {.inline.}
  Source   Edit
proc pos[T](a: GMat4[T]): GVec3[T] {.inline.}
Position of the matrix.   Source   Edit
proc quantize[T: SomeFloat](v, n: T): T {.inline.}
Makes v be multiple of n. Rounding to integer quantize by 1.0.   Source   Edit
proc quantize[T](v`gensym184: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc quantize[T](v`gensym184: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc quantize[T](v`gensym184: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc quat(): Quat {.inline, ...raises: [], tags: [].}
  Source   Edit
proc quat(x`gensym372, y`gensym372, z`gensym372, w`gensym372: float32): Quat {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc quat(x`gensym372: float32): Quat {.inline, ...raises: [], tags: [].}
  Source   Edit
proc quat[T](m: GMat4[T]): GVec4[T] {.inline.}
Create a quaternion from matrix.   Source   Edit
proc quat[T](x`gensym372: GVec4[T]): Quat {.inline.}
  Source   Edit
proc right[T](a: GMat4[T]): GVec3[T] {.inline, inline.}
Vector facing -X.   Source   Edit
proc rotate[T](angle: T): GMat3[T] {.inline.}
Create a 2D rotation matrix by an angle. All angles assume radians.   Source   Edit
proc rotate[T](angle: T; axis: GVec3[T]): GMat4[T] {.inline.}
Return a rotation matrix with axis and angle.   Source   Edit
proc rotateX[T](angle: T): GMat4[T] {.inline.}
Return a rotation matrix around X with angle. All angles assume radians.   Source   Edit
proc rotateY[T](angle: T): GMat4[T] {.inline.}
Return a rotation matrix around Y with angle. All angles assume radians.   Source   Edit
proc rotateZ[T](angle: T): GMat4[T] {.inline.}
Return a rotation matrix around Z with angle. All angles assume radians.   Source   Edit
proc rotationOnly[T](a: GMat4[T]): GMat4[T] {.inline, inline.}
Clears the positional component and returns rotation only. Assumes matrix has not been scaled.   Source   Edit
proc scale[T](v: GVec2[T]): GMat3[T] {.inline.}
Create scale matrix.   Source   Edit
proc scale[T](v: GVec3[T]): GMat4[T] {.inline.}
Create scale matrix.   Source   Edit
proc sign[T](v: T): T {.inline.}
Returns the sign of a number, -1 or 1.   Source   Edit
proc sin[T](v`gensym164: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc sin[T](v`gensym164: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc sin[T](v`gensym164: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc sinh[T](v`gensym170: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc sinh[T](v`gensym170: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc sinh[T](v`gensym170: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc sqrt[T](v`gensym178: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc sqrt[T](v`gensym178: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc sqrt[T](v`gensym178: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc tan[T](v`gensym166: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc tan[T](v`gensym166: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc tan[T](v`gensym166: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc tanh[T](v`gensym172: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc tanh[T](v`gensym172: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc tanh[T](v`gensym172: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc toAngles[T](a: GVec3[T]): GVec3[T] {.inline.}
Given a 3d vector, computes Euler angles: pitch and yaw
pitch (x rotation) yaw (y rotation) roll (z rotation) - always 0 in vector case

All angles assume radians.

  Source   Edit
proc toAngles[T](m: GMat4[T]): GVec3[T] {.inline.}
Decomposes the matrix into Euler angles:
pitch (x rotation) yaw (y rotation) roll (z rotation)

Assumes matrix has not been scaled. All angles assume radians.

  Source   Edit
proc toAngles[T](origin, target: GVec3[T]): GVec3[T] {.inline.}
Gives Euler angles from origin to target
pitch (x rotation) yaw (y rotation) roll (z rotation) - always 0 in vector case

All angles assume radians.

  Source   Edit
proc toAxisAngle[T](q: GVec4[T]): (GVec3[T], T) {.inline.}
Convert a quaternion to axis and angle.   Source   Edit
proc toDegrees(deg: SomeInteger): float32 {.inline.}
Convert degrees to radians.   Source   Edit
proc toDegrees[T: SomeFloat](rad: T): T {.inline.}
Convert radians to degrees.   Source   Edit
proc toDegrees[T](v`gensym186: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc toDegrees[T](v`gensym186: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc toDegrees[T](v`gensym186: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc toRadians(deg: SomeInteger): float32 {.inline.}
Convert degrees to radians.   Source   Edit
proc toRadians[T: SomeFloat](deg: T): T {.inline.}
Convert degrees to radians.   Source   Edit
proc toRadians[T](v`gensym185: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc toRadians[T](v`gensym185: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc toRadians[T](v`gensym185: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc translate[T](v: GVec2[T]): GMat3[T] {.inline.}
Create translation matrix.   Source   Edit
proc translate[T](v: GVec3[T]): GMat4[T] {.inline.}
Create translation matrix.   Source   Edit
proc transpose[T](a: GMat3[T]): GMat3[T] {.inline.}
Return an transpose of the matrix.   Source   Edit
proc transpose[T](a: GMat4[T]): GMat4[T] {.inline.}
Return an transpose of the matrix.   Source   Edit
proc trunc[T](v`gensym182: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc trunc[T](v`gensym182: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc trunc[T](v`gensym182: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc turnAngle[T: SomeFloat](a, b, speed: T): T {.inline.}
Move from angle a to angle b with step of v. All angles assume radians.   Source   Edit
proc up[T](a: GMat4[T]): GVec3[T] {.inline, inline.}
Vector facing +Y.   Source   Edit
proc uvec2(): UVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc uvec2(ivec2: IVec2): UVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc uvec2(x`gensym50, y`gensym50: uint32): UVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc uvec2(x`gensym50: uint32): UVec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc uvec2[T](x`gensym50: GVec2[T]): UVec2 {.inline.}
  Source   Edit
proc uvec3(): UVec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc uvec3(ivec3: IVec3): UVec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc uvec3(x`gensym50, y`gensym50, z`gensym50: uint32): UVec3 {.inline,
    ...raises: [], tags: [].}
  Source   Edit
proc uvec3(x`gensym50: uint32): UVec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc uvec3[T](x`gensym50: GVec2[T]; z`gensym50: T = 0): UVec3 {.inline.}
  Source   Edit
proc uvec3[T](x`gensym50: GVec3[T]): UVec3 {.inline.}
  Source   Edit
proc uvec4(): UVec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc uvec4(ivec4: IVec4): UVec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc uvec4(x`gensym50, y`gensym50, z`gensym50, w`gensym50: uint32): UVec4 {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc uvec4(x`gensym50: uint32): UVec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc uvec4[T](a`gensym50, b`gensym50: GVec2[T]): UVec4 {.inline.}
  Source   Edit
proc uvec4[T](x`gensym50: GVec3[T]; w`gensym50: T = 0): UVec4 {.inline.}
  Source   Edit
proc uvec4[T](x`gensym50: GVec4[T]): UVec4 {.inline.}
  Source   Edit
proc vec2(): Vec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec2(ivec2: IVec2): Vec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec2(uvec2: UVec2): Vec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec2(x`gensym72, y`gensym72: float32): Vec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec2(x`gensym72: float32): Vec2 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec2[T](x`gensym72: GVec2[T]): Vec2 {.inline.}
  Source   Edit
proc vec3(): Vec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec3(ivec3: IVec3): Vec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec3(uvec3: UVec3): Vec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec3(x`gensym72, y`gensym72, z`gensym72: float32): Vec3 {.inline,
    ...raises: [], tags: [].}
  Source   Edit
proc vec3(x`gensym72: float32): Vec3 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec3[T](x`gensym72: GVec2[T]; z`gensym72: T = 0): Vec3 {.inline.}
  Source   Edit
proc vec3[T](x`gensym72: GVec3[T]): Vec3 {.inline.}
  Source   Edit
proc vec4(): Vec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec4(ivec4: IVec4): Vec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec4(uvec4: UVec4): Vec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec4(x`gensym72, y`gensym72, z`gensym72, w`gensym72: float32): Vec4 {.
    inline, ...raises: [], tags: [].}
  Source   Edit
proc vec4(x`gensym72: float32): Vec4 {.inline, ...raises: [], tags: [].}
  Source   Edit
proc vec4[T](a`gensym72, b`gensym72: GVec2[T]): Vec4 {.inline.}
  Source   Edit
proc vec4[T](x`gensym72: GVec3[T]; w`gensym72: T = 0): Vec4 {.inline.}
  Source   Edit
proc vec4[T](x`gensym72: GVec4[T]): Vec4 {.inline.}
  Source   Edit
proc zmod(a, b: float32): float32 {.inline, ...raises: [], tags: [].}
Float point mod.   Source   Edit
proc zmod[T](a`gensym158, b`gensym158: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc zmod[T](a`gensym158, b`gensym158: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc zmod[T](a`gensym158, b`gensym158: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit
proc zmod[T](a`gensym158: GVec2[T]; b`gensym158: T): GVec2[T] {.inline.}
  Source   Edit
proc zmod[T](a`gensym158: GVec3[T]; b`gensym158: T): GVec3[T] {.inline.}
  Source   Edit
proc zmod[T](a`gensym158: GVec4[T]; b`gensym158: T): GVec4[T] {.inline.}
  Source   Edit
proc zmod[T](a`gensym158: T; b`gensym158: GVec2[T]): GVec2[T] {.inline.}
  Source   Edit
proc zmod[T](a`gensym158: T; b`gensym158: GVec3[T]): GVec3[T] {.inline.}
  Source   Edit
proc zmod[T](a`gensym158: T; b`gensym158: GVec4[T]): GVec4[T] {.inline.}
  Source   Edit

Templates

template `[]=`[T](a: var GMat2[T]; i, j: int; v: T)
  Source   Edit
template `[]=`[T](a: var GMat3[T]; i, j: int; v: T)
  Source   Edit
template `[]=`[T](a: var GMat4[T]; i, j: int; v: T)
  Source   Edit
template `[]=`[T](a: var GVec234[T]; i: int; v: T)
  Source   Edit
template `[]`[T](a: GMat2[T]; i, j: int): T
  Source   Edit
template `[]`[T](a: GMat2[T]; i: int): GVec2[T]
  Source   Edit
template `[]`[T](a: GMat3[T]; i, j: int): T
  Source   Edit
template `[]`[T](a: GMat3[T]; i: int): GVec3[T]
  Source   Edit
template `[]`[T](a: GMat4[T]; i, j: int): T
  Source   Edit
template `[]`[T](a: GMat4[T]; i: int): GVec4[T]
  Source   Edit
template `[]`[T](a: GVec234[T]; i: int): T
  Source   Edit
template genMatConstructor(lower, upper, T: untyped)
Generate matrix constructor for your own type.   Source   Edit
template genQuatConstructor(lower, upper, typ: untyped)
Generate quaternion constructor for your own type.   Source   Edit
template genVecConstructor(lower, upper, typ: untyped)
Generate vector constructor for your own type.   Source   Edit
template gvec2[T](x, y: T): GVec2[T]
  Source   Edit
template gvec3[T](x, y, z: T): GVec3[T]
  Source   Edit
template gvec4[T](x, y, z, w: T): GVec4[T]
  Source   Edit
template w=[T](a: var GVec4[T]; value: T)
  Source   Edit
template w[T](a: GVec4[T]): T
  Source   Edit
template w[T](a: var GVec4[T]): var T
  Source   Edit
template x=[T](a: var GVec234[T]; value: T)
  Source   Edit
template x[T](a: GVec2[T]): T
  Source   Edit
template x[T](a: GVec3[T]): T
  Source   Edit
template x[T](a: GVec4[T]): T
  Source   Edit
template x[T](a: var GVec2[T]): var T
  Source   Edit
template x[T](a: var GVec3[T]): var T
  Source   Edit
template x[T](a: var GVec4[T]): var T
  Source   Edit
template y=[T](a: var GVec234[T]; value: T)
  Source   Edit
template y[T](a: GVec2[T]): T
  Source   Edit
template y[T](a: GVec3[T]): T
  Source   Edit
template y[T](a: GVec4[T]): T
  Source   Edit
template y[T](a: var GVec2[T]): var T
  Source   Edit
template y[T](a: var GVec3[T]): var T
  Source   Edit
template y[T](a: var GVec4[T]): var T
  Source   Edit
template z=[T](a: var GVec34[T]; value: T)
  Source   Edit
template z[T](a: GVec3[T]): T
  Source   Edit
template z[T](a: GVec4[T]): T
  Source   Edit
template z[T](a: var GVec3[T]): var T
  Source   Edit
template z[T](a: var GVec4[T]): var T
  Source   Edit