npryce / codea-controllers

A small library of composable multi-touch controllers for Codea that implement various game control mechanisms
26 stars 4 forks source link

ClampLen returns NaNs when applied to zero vectors #4

Closed npryce closed 12 years ago

npryce commented 12 years ago

Fix by adding this condition to clampLen:

if(vec == vec2(0, 0)) then return vec end

See http://twolivesleft.com/Codea/Talk/discussion/comment/9907#Comment_9907

npryce commented 12 years ago

Fixed in commit 36f9b739e4f80ea064e6a819361bfb5d79203235