Skip to content

Instantly share code, notes, and snippets.

@Gonster
Gonster / pow.cr
Last active August 27, 2015 03:54
hola crystal lang
def pow(x,y)
return 1 if y == 0 || x == 1
r = 1
if y > 0
return 0 if x == 0
while y > 0
r *= x
y -= 1
end
else
/**
* This file contains an implementation of an Axis Aligned Bounding Box Tree, by Eyal Shalev
* You can modify it and use it for your projects without any limitations.
* I only ask that:
* 1. You leave this message in the Code.
* 2. Drop me a message that you used it via: https://sourceforge.net/projects/javascripaabbtr/
*
* This file will work as is with no requirements to include other files along-side it.
*
* See example usage in aabbTreeExample.html