math.h

来自「巫魔问题求解」· C头文件 代码 · 共 19 行

H
19
字号
#pragma once
#include <cstdlib>

namespace _tool
{
    const int INFINITY = ~0 >> 1;

    int RandInt();

    int RandInt(unsigned int max_1);

    double RandDouble(double max);

    template <typename T>
    T Abs(const T &x)
    {
        return (x>0) ? x :-x;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?