PrevUpHomeNext

.floor_fpp method


Stay slow, stay steady.

.floor_fpp member function of esv::class_type

esv::class_type::floor_fpp

Method .floor_fpp of esv::class_type is used to get the floor and fixed-point part of a value.

As the calculating of floor will also calculate the fpp, if you want to get both floor and fpp of a value, you can use .floor_fpp method, not .floor method, which can save duplicated calculating.

It returns esv::pair type.

If the value is negative, its floor and fpp are both negative.

c++ example

#include <esvcpp/core.hpp>

int main()
{
	esv::fx128 a = 324.221;
	esv::pair<esv::fx128, esv::fx128> b = a.floor_fpp();
	esv::print(b.first, b.second);	// 324.0 0.221
}

See Also

.floor method

.fpp method

esv::fx128

esv::pair


PrevUpHomeNext

E