⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ngen_random.c

📁 su 的源代码库
💻 C
字号:
/* Copyright (c) Colorado School of Mines, 2006.*//* All rights reserved.                       *//*************************************************************//*                                                           *//*  Copyright (c) 1993                                       *//*  Wenceslau Gouveia                                        *//*  Center for Wave Phenomena      	                     *//*  Colorado School of Mines                                 *//*                                                           *//*  Permission is hereby granted to copy all or any part of  *//*  this program for free distribution.   The author's name  *//*  and this copyright notice must be included in any copy.  *//*                                                           *//*************************************************************//* *  file:	genesis_random.c * *  author:     Wenceslau Gouveia	 * *  created:	1993 * *  purpose:    Alternative random generators for GENESIS * */#include "cwp.h"extern float franuni();double Rand(){	double random;	random = (double) franuni();	return(random);}int Randint(low,high)int low, high;{	float random;	int intrandom;		random = franuni();	intrandom = (int) (random * (high - low + 1) + low);	return (intrandom);}double Randdouble(dlow,dhigh)double dlow, dhigh;{	float random;	double drandom;		random = franuni();	drandom = (double) (random * (dhigh - dlow) + dlow);	return (drandom);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -