Beispiel #1
0
        /// <inheritdoc cref="IBitwiseOperators{TSelf, TOther, TResult}.op_OnesComplement(TSelf)" />
        static float IBitwiseOperators <float, float, float> .operator ~(float value)
        {
            uint bits = ~BitConverter.SingleToUInt32Bits(value);

            return(BitConverter.UInt32BitsToSingle(bits));
        }
Beispiel #2
0
 public Variant(float val)
 {
     _objref = null;
     _flags  = CV_R4;
     _data   = BitConverter.SingleToUInt32Bits(val);
 }
Beispiel #3
0
        /// <inheritdoc cref="IBitwiseOperators{TSelf, TOther, TResult}.op_ExclusiveOr(TSelf, TOther)" />
        static float IBitwiseOperators <float, float, float> .operator ^(float left, float right)
        {
            uint bits = BitConverter.SingleToUInt32Bits(left) ^ BitConverter.SingleToUInt32Bits(right);

            return(BitConverter.UInt32BitsToSingle(bits));
        }