cesium-native 0.48.0
Loading...
Searching...
No Matches
CesiumGltf::MetadataConversions< float, double > Struct Reference

Converts from a double to a float. More...

#include <CesiumGltf/MetadataConversions.h>

Static Public Member Functions

static std::optional< float > convert (double from)
 Converts a double to a float. The value may lose precision during conversion.
 
static std::optional< float > convert (double)
 Converts between TFrom and TTo where no actual conversion is defined, returning std::nullopt.
 

Detailed Description

Converts from a double to a float.

Definition at line 386 of file MetadataConversions.h.

Member Function Documentation

◆ convert() [1/2]

static std::optional< float > CesiumGltf::MetadataConversions< float, double >::convert ( double from)
inlinestatic

Converts a double to a float. The value may lose precision during conversion.

If the value is outside the range of a float, std::nullopt is returned.

Parameters
fromThe double value to be converted.

Definition at line 395 of file MetadataConversions.h.

◆ convert() [2/2]

static std::optional< float > CesiumGltf::MetadataConversions< float, double, void >::convert ( double )
inlinestatic

Converts between TFrom and TTo where no actual conversion is defined, returning std::nullopt.

Definition at line 26 of file MetadataConversions.h.


The documentation for this struct was generated from the following file: