MCPcopy Create free account
hub / github.com/MCUdude/SigmaDSP / floatToInt

Method floatToInt

src/SigmaDSP.cpp:1314–1318  ·  view source on GitHub ↗

* @brief Converts a 5.23 float value to int 28.0 * * @param value Value to convert * @return int32_t converted value in 28.0 format */

Source from the content-addressed store, hash-verified

1312 * @return int32_t converted value in 28.0 format
1313 */
1314int32_t SigmaDSP::floatToInt(float value)
1315{
1316 // Convert float 5.23 to int 28.0
1317 return (value * ((int32_t)1 << 23));
1318}
1319
1320
1321/*******************************************************************************************

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected