Table of Contents

Method RandomOffset

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

RandomOffset(float, float)

Gives a random value within a given range centered around a given value.

public static float RandomOffset(float value, float range)

Parameters

value float

The value around which the random values will be centered.

range float

The range of the returned value.

Returns

float

A random value between value - range/2 and value + range/2.