CMakeTutorialStep1 2.3.12
Loading...
Searching...
No Matches
TutorialMath.hxx
Go to the documentation of this file.
1/*
2 * CodeReviewTime:2026-10-14
3 * 头文件 仅声明 变量 和 函数
4 */
5
6#pragma once
13
14namespace tutorial {
15
17inline constexpr double kComputeSqrtMaxInput = 1.0e12;
18
24double compute_sqrt(double value);
25
31bool has_numeric_argument(int argc);
32
33} // namespace tutorial
Definition ModernParadigm.cxx:11
bool has_numeric_argument(int argc)
argc >= 2 即认为用户提供了待计算的数值参数
Definition TutorialMath.cxx:21
double compute_sqrt(double value)
域检查:非有限、负数或超过 kComputeSqrtMaxInput 时返回 -1.0
Definition TutorialMath.cxx:13
constexpr double kComputeSqrtMaxInput
允许的最大输入;超出(或负数 / 非有限)时 compute_sqrt 返回 -1.0
Definition TutorialMath.hxx:17