Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:41:53

0001 // This file is part of the actsvg package.
0002 //
0003 // Copyright (C) 2022 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include <array>
0012 #include <cmath>
0013 #include <string>
0014 
0015 namespace actsvg {
0016 const std::string __l = "<";
0017 const std::string __r = ">\n";
0018 const std::string __el = "</";
0019 const std::string __er = "/>\n";
0020 const std::string __fs = "/";
0021 const std::string __tab = "\t";
0022 const std::string __nl = "\n";
0023 const std::string __blk = " ";
0024 const std::string __c = ",";
0025 const std::string __d = ".";
0026 
0027 /// @todo make configurable via compile time
0028 using scalar = float;
0029 
0030 scalar constexpr operator""_scalar(long double v) {
0031     return static_cast<scalar>(v);
0032 }
0033 scalar constexpr operator""_scalar(unsigned long long v) {
0034     return static_cast<scalar>(v);
0035 }
0036 
0037 static constexpr scalar pi = static_cast<scalar>(M_PI);
0038 
0039 using point2 = std::array<scalar, 2>;
0040 
0041 }  // namespace actsvg