mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 06:05:17 +00:00
* Add `NaN` and `Inf` defaults to the C++ generated code. * Refactoring: add FloatConstantGenerator * Refactoring-2: - remove isnan checking for all float/double values - add most probable implementation of virtual methods of FloatConstantGenerator * Add conditional (FLATBUFFERS_NAN_DEFAULTS) isnan checking
13 lines
314 B
Plaintext
13 lines
314 B
Plaintext
namespace MyGame;
|
|
|
|
// Not all programmining languages support this extra table.
|
|
table MonsterExra {
|
|
// Float-point values with NaN and Inf defaults.
|
|
testf_nan:float = nan;
|
|
testf_pinf:float = +inf;
|
|
testf_ninf:float = -inf;
|
|
testd_nan:double = nan;
|
|
testd_pinf:double = +inf;
|
|
testd_ninf:double = -inf;
|
|
}
|