|
|
|
@ -13,7 +13,7 @@ namespace ImageSharp.IO |
|
|
|
/// Equivalent of <see cref="System.BitConverter"/>, but with either endianness.
|
|
|
|
/// <remarks>
|
|
|
|
/// Adapted from Miscellaneous Utility Library <see href="http://jonskeet.uk/csharp/miscutil/"/>
|
|
|
|
/// This product includes software developed by Jon Skeet and Marc Gravell. Contact <see href="mailto:skeet@pobox.com"/>, or see
|
|
|
|
/// This product includes software developed by Jon Skeet and Marc Gravell. Contact <see href="mailto:skeet@pobox.com"/>, or see
|
|
|
|
/// <see href="http://www.pobox.com/~skeet/"/>.
|
|
|
|
/// </remarks>
|
|
|
|
/// </summary>
|
|
|
|
@ -28,7 +28,7 @@ namespace ImageSharp.IO |
|
|
|
/// </summary>
|
|
|
|
/// <remarks>
|
|
|
|
/// Different computer architectures store data using different byte orders. "Big-endian"
|
|
|
|
/// means the most significant byte is on the left end of a word. "Little-endian" means the
|
|
|
|
/// means the most significant byte is on the left end of a word. "Little-endian" means the
|
|
|
|
/// most significant byte is on the right end of a word.
|
|
|
|
/// </remarks>
|
|
|
|
/// <returns>true if this converter is little-endian, false otherwise.</returns>
|
|
|
|
@ -66,7 +66,7 @@ namespace ImageSharp.IO |
|
|
|
|
|
|
|
#region Double/primitive conversions
|
|
|
|
/// <summary>
|
|
|
|
/// Converts the specified double-precision floating point number to a
|
|
|
|
/// Converts the specified double-precision floating point number to a
|
|
|
|
/// 64-bit signed integer. Note: the endianness of this converter does not
|
|
|
|
/// affect the returned value.
|
|
|
|
/// </summary>
|
|
|
|
@ -78,7 +78,7 @@ namespace ImageSharp.IO |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Converts the specified 64-bit signed integer to a double-precision
|
|
|
|
/// Converts the specified 64-bit signed integer to a double-precision
|
|
|
|
/// floating point number. Note: the endianness of this converter does not
|
|
|
|
/// affect the returned value.
|
|
|
|
/// </summary>
|
|
|
|
@ -90,7 +90,7 @@ namespace ImageSharp.IO |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Converts the specified single-precision floating point number to a
|
|
|
|
/// Converts the specified single-precision floating point number to a
|
|
|
|
/// 32-bit signed integer. Note: the endianness of this converter does not
|
|
|
|
/// affect the returned value.
|
|
|
|
/// </summary>
|
|
|
|
@ -102,7 +102,7 @@ namespace ImageSharp.IO |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Converts the specified 32-bit signed integer to a single-precision floating point
|
|
|
|
/// Converts the specified 32-bit signed integer to a single-precision floating point
|
|
|
|
/// number. Note: the endianness of this converter does not
|
|
|
|
/// affect the returned value.
|
|
|
|
/// </summary>
|
|
|
|
@ -139,7 +139,7 @@ namespace ImageSharp.IO |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns a double-precision floating point number converted from eight bytes
|
|
|
|
/// Returns a double-precision floating point number converted from eight bytes
|
|
|
|
/// at a specified position in a byte array.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="value">An array of bytes.</param>
|
|
|
|
@ -151,7 +151,7 @@ namespace ImageSharp.IO |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns a single-precision floating point number converted from four bytes
|
|
|
|
/// Returns a single-precision floating point number converted from four bytes
|
|
|
|
/// at a specified position in a byte array.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="value">An array of bytes.</param>
|
|
|
|
@ -285,7 +285,7 @@ namespace ImageSharp.IO |
|
|
|
/// <param name="value">An array of bytes.</param>
|
|
|
|
/// <remarks>All the elements of value are converted.</remarks>
|
|
|
|
/// <returns>
|
|
|
|
/// A String of hexadecimal pairs separated by hyphens, where each pair
|
|
|
|
/// A String of hexadecimal pairs separated by hyphens, where each pair
|
|
|
|
/// represents the corresponding element in value; for example, "7F-2C-4A".
|
|
|
|
/// </returns>
|
|
|
|
public static string ToString(byte[] value) |
|
|
|
@ -300,7 +300,7 @@ namespace ImageSharp.IO |
|
|
|
/// <param name="startIndex">The starting position within value.</param>
|
|
|
|
/// <remarks>The elements from array position startIndex to the end of the array are converted.</remarks>
|
|
|
|
/// <returns>
|
|
|
|
/// A String of hexadecimal pairs separated by hyphens, where each pair
|
|
|
|
/// A String of hexadecimal pairs separated by hyphens, where each pair
|
|
|
|
/// represents the corresponding element in value; for example, "7F-2C-4A".
|
|
|
|
/// </returns>
|
|
|
|
public static string ToString(byte[] value, int startIndex) |
|
|
|
@ -316,7 +316,7 @@ namespace ImageSharp.IO |
|
|
|
/// <param name="length">The number of bytes to convert.</param>
|
|
|
|
/// <remarks>The length elements from array position startIndex are converted.</remarks>
|
|
|
|
/// <returns>
|
|
|
|
/// A String of hexadecimal pairs separated by hyphens, where each pair
|
|
|
|
/// A String of hexadecimal pairs separated by hyphens, where each pair
|
|
|
|
/// represents the corresponding element in value; for example, "7F-2C-4A".
|
|
|
|
/// </returns>
|
|
|
|
public static string ToString(byte[] value, int startIndex, int length) |
|
|
|
@ -327,7 +327,7 @@ namespace ImageSharp.IO |
|
|
|
|
|
|
|
#region Decimal conversions
|
|
|
|
/// <summary>
|
|
|
|
/// Returns a decimal value converted from sixteen bytes
|
|
|
|
/// Returns a decimal value converted from sixteen bytes
|
|
|
|
/// at a specified position in a byte array.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="value">An array of bytes.</param>
|
|
|
|
@ -688,7 +688,7 @@ namespace ImageSharp.IO |
|
|
|
private readonly float f; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="Int32SingleUnion"/> struct.
|
|
|
|
/// Initializes a new instance of the <see cref="Int32SingleUnion"/> struct.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="i">The integer value of the new instance.</param>
|
|
|
|
internal Int32SingleUnion(int i) |
|
|
|
@ -698,7 +698,7 @@ namespace ImageSharp.IO |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="Int32SingleUnion"/> struct.
|
|
|
|
/// Initializes a new instance of the <see cref="Int32SingleUnion"/> struct.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="f">
|
|
|
|
/// The floating point value of the new instance.
|
|
|
|
|