Otter  0.9.88
2d Game Development Framework based on SFML.Net
 All Classes Namespaces Functions Variables Enumerations Properties
Otter.Range Class Reference

Class used to represent a range using a min and max. More...

Public Member Functions

 Range (float min, float max)
 Create a new Range. More...
 
 Range (float max)
 Create a new Range. More...
 
bool Overlap (Range r)
 Test if this Range overlaps another Range. More...
 
override string ToString ()
 

Public Attributes

float Min
 The minimum of the range. More...
 
float Max
 The maximum of the range. More...
 

Properties

int RandInt [get]
 Get a random int from the range. Floors the Min and Ceils the Max. More...
 
float RandFloat [get]
 Get a random float from the range. More...
 

Detailed Description

Class used to represent a range using a min and max.

Constructor & Destructor Documentation

Otter.Range.Range ( float  min,
float  max 
)

Create a new Range.

Parameters
minMinimum value.
maxMaximum value.
Otter.Range.Range ( float  max)

Create a new Range.

Parameters
maxMaximum value. Minimum is -Maximum.

Member Function Documentation

bool Otter.Range.Overlap ( Range  r)

Test if this Range overlaps another Range.

Parameters
rThe Range to test against.
Returns
True if the ranges overlap.

Member Data Documentation

float Otter.Range.Max

The maximum of the range.

float Otter.Range.Min

The minimum of the range.

Property Documentation

float Otter.Range.RandFloat
get

Get a random float from the range.

Returns
A random float.
int Otter.Range.RandInt
get

Get a random int from the range. Floors the Min and Ceils the Max.

Returns
A random int.

The documentation for this class was generated from the following file: