/// <summary> /// Converts this <see cref="float"/> to an <see cref="int"/>. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> public static int Wrap(this float value) { var u = new FloatIntUnion() { f = value }; return(u.i); }
/// <summary> /// Converts this <see cref="int"/> to a <see cref="float"/>. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> public static float Unwrap(this int value) { var u = new FloatIntUnion() { i = value }; return(u.f); }