-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathExtensions.hpp
More file actions
22 lines (17 loc) · 944 Bytes
/
Copy pathExtensions.hpp
File metadata and controls
22 lines (17 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
#include "Utility/package.hpp"
//---------------------------------------------------------------------------------
// Written by Terence J. Grant - tjgrant [at] tatewake [dot] com
// Find the full tutorial at: http://gamedev.tutsplus.com/series/
//----------------------------------------------------------------------------------
class Extensions
{
public:
static float toAngle(const tVector2f& vector);
static tVector2f scaleTo(const tVector2f& vector, float length);
static tPoint2f toPoint(const tVector2f& vector);
static float nextFloat(float minValue, float maxValue);
static tVector2f nextVector2(float minLength, float maxLength);
static tColor4f colorLerp(const tColor4f& a, const tColor4f& b, float alpha);
static void drawLine(tSpriteBatch* spriteBatch, const tVector2f& start, const tVector2f& end, const tColor4f& color, float thickness = 2.0f);
};