PrevUpHomeNext

esv::fx32


It's kind of fun to do the impossible.

esv::fx32 - esv::f32

esv::fx32 is 32-bit floating point class type. It is c++ class, so esv::fx32 is object-oriented basic floating type.

esv::fx32 - esv::f32, the class type of esv::f32.

esv::fx32 can be initialized by a floating number, as it has converting constructor to initialize the object:

esv::fx32 x = 3.14314f;
esv::fx32 y{4.13f};

esv::fx32 fulfills all basic floating number operarors, and it also has operator<< to do printing:

esv::fx32 x = 1.234f;
std::cout << x << std::endl;

esv::fx32 has three member functions which make esv::fx32 to be converted to basic floating number:

esv::fx32 x = 8.9f;
esv::f32 a = x;
esv::f32 b = x();
esv::f32 c = x.value();

esv::fx32 has a special member function to get the underlying value ref:

esv::fx32 c++ example

#include <esvcpp/core.hpp>

int main()
{
	esv::fx32 x = 1.1f;
	esv::fx32 y = x*(x+1);
	esv::print(x, y); // 1.1 2.31
}

PrevUpHomeNext

esv::print