add numerical recipes library
This commit is contained in:
13
lib/nr/k_and_r/recipes/ranpt.c
Normal file
13
lib/nr/k_and_r/recipes/ranpt.c
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
extern long idum;
|
||||
|
||||
void ranpt(pt,regn,n)
|
||||
float pt[],regn[];
|
||||
int n;
|
||||
{
|
||||
float ran1();
|
||||
int j;
|
||||
|
||||
for (j=1;j<=n;j++)
|
||||
pt[j]=regn[j]+(regn[n+j]-regn[j])*ran1(&idum);
|
||||
}
|
||||
Reference in New Issue
Block a user