PrevUpHomeNext

.floor_fpp method


.floor_fpp member function of utx::class_type

utx::class_type::floor_fpp

Method .floor_fpp of utx::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 utx::pair type.

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

c++ example

#include <utxcpp/core.hpp>

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

See Also

.floor method

.fpp method

utx::fx128

utx::pair


PrevUpHomeNext

utx::print

esv::print