The open source repository for the action RPG game in development by Sig Productions titled 'Adventures in Lestoria'! https://forums.lestoria.net
 
 
 
 
 
 
AdventuresInLestoria/Crawler/utils.cpp

9 lines
193 B

#include "utils.h"
float util::random(float range){
return float(rand())/RAND_MAX*range;
}
vf2d util::pointTo(vf2d posFrom,vf2d posTo){
return geom2d::line(posFrom,posTo).vector().norm();
}