/*! * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE, * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * file types.h * date 12/13/2019 * author Behrouz NematiPour * */ #pragma once // Qt #include // Project namespace types { /*! * \brief The F32 union * \details This is the union which will be used to extract the bytes of a float type value * 4 bytes */ union F32{ float value = 0; quint8 bytes[sizeof(float)]; }; /*! * \brief The U32 union * \details This is the union which will be used to extract the bytes of an unsigned int type value * 4 bytes */ union U32 { quint32 value = 0; quint8 bytes[sizeof(quint32)]; }; /*! * \brief The S32 union * \details This is the union which will be used to extract the bytes of an signed int type value * 4 bytes */ union S32 { qint32 value = 0; quint8 bytes[sizeof(qint32)]; }; extern bool floatCompare(float f1, float f2); }