File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// SPDX-FileCopyrightText: 2025 Guus Kuiper
2- //
2+ //
33// SPDX-License-Identifier: MIT
44
55namespace LibStored . Net ;
@@ -83,12 +83,12 @@ public enum Types : byte
8383 /// <summary>
8484 /// Native signed integer type (platform size).
8585 /// </summary>
86- Int = Types . FlagFixed | Types . FlagInt | ( sizeof ( int ) - 1 ) ,
86+ Int = Types . FlagFixed | Types . FlagInt | Types . FlagSigned | ( sizeof ( int ) - 1 ) ,
8787
8888 /// <summary>
8989 /// Native unsigned integer type (platform size).
9090 /// </summary>
91- Uint = Types . FlagFixed | ( sizeof ( uint ) - 1 ) ,
91+ Uint = Types . FlagFixed | Types . FlagInt | ( sizeof ( uint ) - 1 ) ,
9292
9393 /// <summary>
9494 /// 32-bit floating point type.
Original file line number Diff line number Diff line change @@ -39,6 +39,13 @@ public static class TypesExtensions
3939 /// <returns>True if the type is signed; otherwise, false.</returns>
4040 public static bool IsSigned ( this Types type ) => ( type & Types . FlagSigned ) != 0 ;
4141
42+ /// <summary>
43+ /// Determines whether the type is a floating point number.
44+ /// </summary>
45+ /// <param name="type">The type to check.</param>
46+ /// <returns>True if the type is floating point number; otherwise, false.</returns>
47+ public static bool IsFloat ( this Types type ) => type . IsFixed ( ) && type . IsSigned ( ) && ! type . IsInt ( ) ;
48+
4249 /// <summary>
4350 /// Determines whether the type is a special type (undefined length).
4451 /// </summary>
You can’t perform that action at this time.
0 commit comments