motion/joybox/macros.rb in joybox-0.0.6 vs motion/joybox/macros.rb in joybox-1.0.0
- old
+ new
@@ -82,21 +82,21 @@
def jbpDistanceSQ(first_point, second_point)
jbpLengthSQ(jbpSub(first_point, second_point))
end
# Distance between point an origin
- def jbpLenght(point)
+ def jbpLength(point)
Math.sqrt(jbpLengthSQ(point))
end
# Distance between two points
def jbpDistance(first_point, second_point)
- jbpLenght(jbpSub(first_point, second_point))
+ jbpLength(jbpSub(first_point, second_point))
end
# Point multiplied to a lenght of 1
def jbpNormalize(point)
- jbpMult(point, 1.0 / jbpLenght(point))
+ jbpMult(point, 1.0 / jbpLength(point))
end
# Converts radians to a normalized vector
def jbpForAngle(angle)
jbp(Math.cos(angle), Math.sin(angle))
\ No newline at end of file