add numerical recipes library
This commit is contained in:
12
lib/nr/cpp/recipes/ranpt.cpp
Normal file
12
lib/nr/cpp/recipes/ranpt.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "nr.h"
|
||||
|
||||
extern int idum;
|
||||
|
||||
void NR::ranpt(Vec_O_DP &pt, Vec_I_DP ®n)
|
||||
{
|
||||
int j;
|
||||
|
||||
int n=pt.size();
|
||||
for (j=0;j<n;j++)
|
||||
pt[j]=regn[j]+(regn[n+j]-regn[j])*ran1(idum);
|
||||
}
|
||||
Reference in New Issue
Block a user