Flutter Engine
The Flutter Engine
math.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_FML_MATH_H_
6#define FLUTTER_FML_MATH_H_
7
8namespace flutter {
9namespace math {
10
11// e
12constexpr float kE = 2.7182818284590452354;
13
14// log_2 e
15constexpr float kLog2E = 1.4426950408889634074;
16
17// log_10 e
18constexpr float kLog10E = 0.43429448190325182765;
19
20// log_e 2
21constexpr float kLogE2 = 0.69314718055994530942;
22
23// log_e 10
24constexpr float kLogE10 = 2.30258509299404568402;
25
26// pi
27constexpr float kPi = 3.14159265358979323846;
28
29// pi/2
30constexpr float kPiOver2 = 1.57079632679489661923;
31
32// pi/4
33constexpr float kPiOver4 = 0.78539816339744830962;
34
35// 1/pi
36constexpr float k1OverPi = 0.31830988618379067154;
37
38// 2/pi
39constexpr float k2OverPi = 0.63661977236758134308;
40
41// 2/sqrt(pi)
42constexpr float k2OverSqrtPi = 1.12837916709551257390;
43
44// sqrt(2)
45constexpr float kSqrt2 = 1.41421356237309504880;
46
47// 1/sqrt(2)
48constexpr float k1OverSqrt2 = 0.70710678118654752440;
49
50} // namespace math
51} // namespace flutter
52
53#endif // FLUTTER_FML_MATH_H_
constexpr float kLog2E
Definition: math.h:15
constexpr float kSqrt2
Definition: math.h:45
constexpr float kPiOver4
Definition: math.h:33
constexpr float kPi
Definition: math.h:27
constexpr float k2OverPi
Definition: math.h:39
constexpr float kPiOver2
Definition: math.h:30
constexpr float kLogE2
Definition: math.h:21
constexpr float k2OverSqrtPi
Definition: math.h:42
constexpr float kE
Definition: math.h:12
constexpr float k1OverSqrt2
Definition: math.h:48
constexpr float kLog10E
Definition: math.h:18
constexpr float k1OverPi
Definition: math.h:36
constexpr float kLogE10
Definition: math.h:24