Branch data Line data Source code
1 : : /* 2 : : * ----------------- BEGIN LICENSE BLOCK --------------------------------- 3 : : * 4 : : * Copyright (C) 2018-2020 Intel Corporation 5 : : * 6 : : * SPDX-License-Identifier: MIT 7 : : * 8 : : * ----------------- END LICENSE BLOCK ----------------------------------- 9 : : */ 10 : : 11 : : /** 12 : : * Generated file 13 : : * @file 14 : : * 15 : : * Generator Version : 11.0.0-1997 16 : : */ 17 : : 18 : : #include "ad/physics/Distance.hpp" 19 : : #include "ad/physics/DistanceSquared.hpp" 20 : : 21 : : /*! 22 : : * @brief namespace ad 23 : : */ 24 : : namespace ad { 25 : : /*! 26 : : * @brief namespace physics 27 : : */ 28 : : namespace physics { 29 : : 30 : : const double Distance::cMinValue = -1e9; 31 : : 32 : : const double Distance::cMaxValue = 1e9; 33 : : 34 : : const double Distance::cPrecisionValue = 1e-3; 35 : : 36 : : } // namespace physics 37 : : } // namespace ad 38 : : /*! 39 : : * @brief namespace ad 40 : : */ 41 : : namespace ad { 42 : : /*! 43 : : * @brief namespace physics 44 : : */ 45 : : namespace physics { 46 : : 47 : 3 : ::ad::physics::DistanceSquared Distance::operator*(const Distance &other) const 48 : : { 49 [ + + ]: 3 : ensureValid(); 50 [ + + ]: 2 : other.ensureValid(); 51 : 1 : ::ad::physics::DistanceSquared const result(mDistance * other.mDistance); 52 : 1 : result.ensureValid(); // LCOV_EXCL_BR_LINE On correct definition of squarerooted type, this cannot not happen 53 : 1 : return result; 54 : : } 55 : : 56 : : } // namespace physics 57 : : } // namespace ad