Console Library 8.0.0
A header-only library that makes C++ simple
Loading...
Searching...
No Matches
console::ops::sign_t Struct Reference

符号变换器。 More...

#include <gextra.h>

Public Member Functions

template<class T>
int operator() (T x) const
 计算输入值的符号。

Detailed Description

符号变换器。

返回输入值的符号:正数返回1,负数返回-1,零返回0。

Member Function Documentation

◆ operator()()

template<class T>
int console::ops::sign_t::operator() ( T x) const
inline

计算输入值的符号。

Parameters
x输入值。
Returns
(x > 0) - (x < 0)。

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