planetis-m / naylib

Yet another raylib Nim wrapper
MIT License
233 stars 10 forks source link

distanceSqr for Vector3 is not exported #120

Closed xigoi closed 5 months ago

xigoi commented 5 months ago

From src/raymath.nim:

func distanceSqr(v1, v2: Vector3): float32 {.inline.} =
              # ↑ missing asterisk here
  ## Calculate square distance between two vectors
  result = 0'f32
  let dx = v2.x - v1.x
  let dy = v2.y - v1.y
  let dz = v2.z - v1.z
  result = dx * dx + dy * dy + dz * dz
planetis-m commented 5 months ago

Thanks fixed.