PrevUpHomeNext

utx::cos


utx::cos

utx::cos is a function object of class utx::cos_class.

Calling Sig

Result type is always floating (auto-deduced), arg type is auto-deduced

constexpr auto result = utx::cos(value);

Result type is explicit set, arg type is auto-deduced

constexpr auto result = utx::cos.fn<result_type>(value);

Result type is explicit set, arg type is explicit set

constexpr auto result = utx::cos.fn<result_type, arg_type>(value);

Note

[Note] Note
  • The returned float type is one of utx::f32, utx::f64, utx::f128, utx::fmax, utx::fx32, utx::fx64, utx::fx128, utx::fxmax.
  • constexpr support.

Header

#include <utxcpp/math.hpp>

c++ example

#include <utxcpp/math.hpp>
#include <utxcpp/core.hpp>

int main()
{
	constexpr auto x = utx::cos(std::numbers::pi/4);
	constexpr utx::fx32 y = x;
	constexpr auto z = utx::cos(y); // return utx::fx32
	utx::print(x, y, z);
}

See Also

utx::sin

utx::print


PrevUpHomeNext

E

U