📄 oceanutil.h
字号:
#ifndef OCEANUTIL_H
#define OCEANUTIL_H
#include<math.h>
#include <stdlib.h>
typedef struct
{
double real;
double imag;
}oceanComplex;
typedef struct
{
union {
double x;
double u;
double r;
};
union {
double y;
double v;
double g;
};
union {
double z;
double w;
double b;
};
}oceanVector;
#define worldGravity 9.81f
const double maxHeight = 200.0f;
float ranf();
void ouGauss(double work[2]);
double ouPhillips(double a,double k[2],double wind[2]);
void ouNormalize(double vec[]);
void ouCrossProd(double in1[],double in2[],double out[3]);
bool ouPowerof2(int,int *,int *);
int ouFFT(int dir,int m,double *x,double *y);
int ouFFT2D(oceanComplex c[][512],int nx,int ny,int dir);
float ouNeg1Pow(int k);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -