add numerical recipes library
This commit is contained in:
11
lib/nr/ansi/recipes/ranpt.c
Normal file
11
lib/nr/ansi/recipes/ranpt.c
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
extern long idum;
|
||||
|
||||
void ranpt(float pt[], float regn[], int n)
|
||||
{
|
||||
float ran1(long *idum);
|
||||
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