Skip to content

Commit e3846da

Browse files
committed
IsFloatingPointWave/IsDoubleFloatingPointWave/IsSingleFloatingPointWave: Fix return value for complex waves
We only want to return 0 or 1. and not the numeric type.
1 parent 68bbd09 commit e3846da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Packages/MIES/MIES_Utilities_Checks.ipf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,23 +211,23 @@ threadsafe Function IsFloatingPointWave(WAVE wv)
211211

212212
variable type = WaveType(wv)
213213

214-
return (type & IGOR_TYPE_32BIT_FLOAT) || (type & IGOR_TYPE_64BIT_FLOAT)
214+
return (type & IGOR_TYPE_32BIT_FLOAT) == IGOR_TYPE_32BIT_FLOAT || (type & IGOR_TYPE_64BIT_FLOAT) == IGOR_TYPE_64BIT_FLOAT
215215
End
216216

217217
/// @brief Return 1 if the wave is a double (64bit) precision floating point wave
218218
///
219219
/// UTF_NOINSTRUMENTATION
220220
threadsafe Function IsDoubleFloatingPointWave(WAVE wv)
221221

222-
return WaveType(wv) & IGOR_TYPE_64BIT_FLOAT
222+
return (WaveType(wv) & IGOR_TYPE_64BIT_FLOAT) == IGOR_TYPE_64BIT_FLOAT
223223
End
224224

225225
/// @brief Return 1 if the wave is a single (32bit) precision floating point wave
226226
///
227227
/// UTF_NOINSTRUMENTATION
228228
threadsafe Function IsSingleFloatingPointWave(WAVE wv)
229229

230-
return WaveType(wv) & IGOR_TYPE_32BIT_FLOAT
230+
return (WaveType(wv) & IGOR_TYPE_32BIT_FLOAT) == IGOR_TYPE_32BIT_FLOAT
231231
End
232232

233233
/// @brief Return 1 if the wave is a global wave (not a null wave and not a free wave)

0 commit comments

Comments
 (0)