The open source repository for the action RPG game in development by Sig Productions titled 'Adventures in Lestoria'! https://forums.lestoria.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
AdventuresInLestoria/Crawler/util.h

16 lines
594 B

#pragma once
#include <stdlib.h>
#include "olcUTIL_Geometry2D.h"
namespace util{
//Returns 0-range (as a float).
float random(float range);
//Returns a normalized vector pointing from posFrom towards posTo.
vf2d pointTo(vf2d posFrom,vf2d posTo);
//Returns the angle (in radians) pointing from posFrom towards posTo.
float angleTo(vf2d posFrom,vf2d posTo);
float degToRad(float deg);
float radToDeg(float rad);
float lerp(float n1,float n2,double t);
std::string timerStr(float time);
std::string WrapText(PixelGameEngine*pge,std::string str,int width,bool proportional,vd2d scale);
}