/*
 * D2F
 * Copyright (C) SatisKia. All rights reserved.
 */

#include "_Global.h"

class _Random
{
	function _Random()
	{
	}

	function next( n:Number ):Number
	{
		if( Math.random() < 0.5 )
		{
			return -Math.floor( Math.random() * n );
		}
		return Math.floor( Math.random() * n );
	}

	function nextInt():Number
	{
		return next( 0x80000000 );
	}
}
