mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
[g2clib] Fix warning about conversion from double to float
This commit is contained in:
@@ -51,8 +51,8 @@ g2int specunpack(unsigned char *cpack,g2int *idrstmpl,g2int ndpts,g2int JJ,
|
||||
g2int inc,incu,incp;
|
||||
|
||||
rdieee(idrstmpl+0,&ref,1);
|
||||
bscale = int_power(2.0,idrstmpl[1]);
|
||||
dscale = int_power(10.0,-idrstmpl[2]);
|
||||
bscale = (g2float)int_power(2.0,idrstmpl[1]);
|
||||
dscale = (g2float)int_power(10.0,-idrstmpl[2]);
|
||||
nbits = idrstmpl[3];
|
||||
Js=idrstmpl[5];
|
||||
Ks=idrstmpl[6];
|
||||
@@ -72,9 +72,9 @@ g2int specunpack(unsigned char *cpack,g2int *idrstmpl,g2int ndpts,g2int JJ,
|
||||
// Calculate Laplacian scaling factors for each possible wave number.
|
||||
//
|
||||
pscale=(g2float *)malloc((JJ+MM+1)*sizeof(g2float));
|
||||
tscale=(g2float)idrstmpl[4]*1E-6;
|
||||
tscale=(g2float)idrstmpl[4]*1E-6f;
|
||||
for (n=Js;n<=JJ+MM;n++)
|
||||
pscale[n]=pow((g2float)(n*(n+1)),-tscale);
|
||||
pscale[n]=(g2float)pow((g2float)(n*(n+1)),-tscale);
|
||||
//
|
||||
// Assemble spectral coeffs back to original order.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user