This repository has been archived on 2019-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
dungeon-gunner/source/util/Interval.h

28 lines
490 B
C++

/*
* Interval.h
*
* Created on: 03.04.2013
* Author: Felix
*/
#ifndef DG_INTERVAL_H_
#define DG_INTERVAL_H_
class Interval {
public:
static Interval IntervalFromRadius(float center, float radius);
static Interval IntervalFromPoints(float start, float end);
Interval getOverlap(const Interval& other) const;
bool isInside(float point) const;
float getLength();
public:
float start;
float end;
private:
Interval(float start, float end);
};
#endif /* DG_INTERVAL_H_ */