Module vector3

Types

Vector3* {.
byref
.} = object x*: float32 y*: float32 z*: float32
  Source Edit

Procs

proc vec3*(): Vector3 {.
inline
.}
  Source Edit
proc vec3*(x, y, z: float32): Vector3 {.
inline
.}
  Source Edit
proc `$`*(self: Vector3): string {.
inline
.}
  Source Edit
proc `+`*(a, b: Vector3): Vector3 {.
inline
.}
  Source Edit
proc `+=`*(a: var Vector3; b: Vector3) {.
inline
.}
  Source Edit
proc `-`*(a, b: Vector3): Vector3 {.
inline
.}
  Source Edit
proc `-=`*(a: var Vector3; b: Vector3) {.
inline
.}
  Source Edit
proc `*`*(a, b: Vector3): Vector3 {.
inline
.}
  Source Edit
proc `*=`*(a: var Vector3; b: Vector3) {.
inline
.}
  Source Edit
proc `*`*(a: Vector3; b: float32): Vector3 {.
inline
.}
  Source Edit
proc `*`*(b: float32; a: Vector3): Vector3 {.
inline
.}
  Source Edit
proc `*=`*(a: var Vector3; b: float32) {.
inline
.}
  Source Edit
proc `/`*(a, b: Vector3): Vector3
  Source Edit
proc `/=`*(a: var Vector3; b: Vector3) {.
inline
.}
  Source Edit
proc `/`*(a: Vector3; b: float32): Vector3
  Source Edit
proc `/=`*(a: var Vector3; b: float32) {.
inline
.}
  Source Edit
proc `==`*(a, b: Vector3): bool {.
inline
.}
  Source Edit
proc `<`*(a, b: Vector3): bool
  Source Edit
proc `-`*(self: Vector3): Vector3
  Source Edit
proc `[]`*(self: Vector3; idx: range[0 .. 2]): float32 {.
inline
.}
  Source Edit
proc `[]`*(self: var Vector3; idx: range[0 .. 2]): var float32 {.
inline
.}
  Source Edit
proc `[]=`*(self: var Vector3; idx: range[0 .. 2]; val: float32) {.
inline
.}
  Source Edit
proc minAxis*(self: Vector3): int {.
inline
.}
  Source Edit
proc maxAxis*(self: Vector3): int {.
inline
.}
  Source Edit
proc length*(self: Vector3): float32 {.
inline
.}
  Source Edit
proc lengthSquared*(self: Vector3): float32 {.
inline
.}
  Source Edit
proc normalize*(self: var Vector3) {.
inline
.}
  Source Edit
proc normalized*(self: Vector3): Vector3 {.
inline
.}
  Source Edit
proc isNormalized*(self: Vector3): bool {.
inline
.}
  Source Edit
proc zero*(self: var Vector3) {.
inline
.}
  Source Edit
proc inverse*(self: Vector3): Vector3 {.
inline
.}
  Source Edit
proc cross*(self, other: Vector3): Vector3 {.
inline
.}
  Source Edit
proc dot*(self, other: Vector3): float32 {.
inline
.}
  Source Edit
proc abs*(self: Vector3): Vector3 {.
inline
.}
  Source Edit
proc sign*(self: Vector3): Vector3 {.
inline
.}
  Source Edit
proc floor*(self: Vector3): Vector3 {.
inline
.}
  Source Edit
proc ceil*(self: Vector3): Vector3 {.
inline
.}
  Source Edit
proc lerp*(self: Vector3; other: Vector3; t: float32): Vector3 {.
inline
.}
  Source Edit
proc distanceTo*(self, other: Vector3): float32 {.
inline
.}
  Source Edit
proc distanceSquaredTo*(self, other: Vector3): float32 {.
inline
.}
  Source Edit
proc angleTo*(self, other: Vector3): float32 {.
inline
.}
  Source Edit
proc slide*(self, n: Vector3): Vector3 {.
inline
.}
  Source Edit
proc reflect*(self, n: Vector3): Vector3 {.
inline
.}
  Source Edit
proc bounce*(self, n: Vector3): Vector3 {.
inline
.}
  Source Edit
proc snap*(self: var Vector3; other: Vector3)
  Source Edit
proc snapped*(self: Vector3; other: Vector3): Vector3
  Source Edit
proc cubicInterpolate*(self, b, preA, postB: Vector3; t: float32): Vector3
  Source Edit