Merge "Ensure BaseHandle class move noexcept (core public-api)" into devel/master
[platform/core/uifw/dali-core.git] / dali / public-api / math / angle-axis.h
index 41c8125..721e7a7 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_ANGLE_AXIS_H__
-#define __DALI_ANGLE_AXIS_H__
+#ifndef DALI_ANGLE_AXIS_H
+#define DALI_ANGLE_AXIS_H
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@
 namespace Dali
 {
 /**
- * @addtogroup dali_core_object
+ * @addtogroup dali_core_math
  * @{
  */
 
@@ -45,57 +45,65 @@ struct Radian;
 struct AngleAxis
 {
   /**
-   * @brief Create an angle-axis pair.
+   * @brief Creates an angle-axis pair.
    * @SINCE_1_0.0
    */
   AngleAxis()
   : angle(0.0f),
     axis(0.0f, 0.0f, 0.0f)
-  { }
+  {
+  }
 
   /**
-   * @brief Create an angle-axis pair.
+   * @brief Creates an angle-axis pair.
    *
    * @SINCE_1_0.0
-   * @param[in] initialAngle The initial angle in radians.
-   * @param[in] initialAxis The initial axis.
+   * @param[in] initialAngle The initial angle in radians
+   * @param[in] initialAxis The initial axis
    */
-  AngleAxis( Radian initialAngle, const Vector3& initialAxis )
-  : angle( initialAngle ),
-    axis( initialAxis )
-  { }
+  AngleAxis(Radian initialAngle, const Vector3& initialAxis)
+  : angle(initialAngle),
+    axis(initialAxis)
+  {
+  }
 
-  Radian angle; ///< The angle in radians
-  Vector3 axis; ///< The axis
+public:
+  AngleAxis(const AngleAxis&) = default;            ///< Default copy constructor
+  AngleAxis(AngleAxis&&) noexcept = default;            ///< Default move constructor
+  AngleAxis& operator=(const AngleAxis&) = default; ///< Default copy assignment operator
+  AngleAxis& operator=(AngleAxis&&) noexcept = default;      ///< Default move assignment operator
 
+public:
+  Radian  angle; ///< The angle in radians
+  Vector3 axis;  ///< The axis
 };
 
 // Compiler generated destructor, copy constructor and assignment operators are ok as this class is POD
 
 /**
- * @brief Compare two angle axis for equality
+ * @brief Compares two angle axis for equality.
  *
  * @SINCE_1_0.0
  * @param lhs angle axis
  * @param rhs angle axis
  * @return True if they are equal
  */
-inline bool operator==( const Dali::AngleAxis& lhs, const Dali::AngleAxis& rhs )
+inline bool operator==(const Dali::AngleAxis& lhs, const Dali::AngleAxis& rhs)
 {
   return (lhs.angle == rhs.angle) && (lhs.axis == rhs.axis);
 }
 
 /**
- * @brief Print an angle axis
+ * @brief Prints an angle axis.
  *
  * @SINCE_1_1.33
- * @param [in] o The output stream operator.
- * @param [in] angleAxis The angle axis to print
- * @return The output stream operator.
+ * @param[in] o The output stream operator
+ * @param[in] angleAxis The angle axis to print
+ * @return The output stream operator
  */
-inline std::ostream& operator<< (std::ostream& o, const Dali::AngleAxis& angleAxis)
+inline std::ostream& operator<<(std::ostream& o, const Dali::AngleAxis& angleAxis)
 {
-  return o << "[ Axis: [" << angleAxis.axis.x << ", " << angleAxis.axis.y << ", " << angleAxis.axis.z << "], Angle: " << Degree( angleAxis.angle ).degree << " degrees ]";
+  return o << "[ Axis: [" << angleAxis.axis.x << ", " << angleAxis.axis.y << ", " << angleAxis.axis.z << "], Angle: " << Degree(angleAxis.angle).degree << " degrees ]";
 }
 
 /**
@@ -103,4 +111,4 @@ inline std::ostream& operator<< (std::ostream& o, const Dali::AngleAxis& angleAx
  */
 } // namespace Dali
 
-#endif // __DALI_ANGLE_AXIS_H__
+#endif // DALI_ANGLE_AXIS_H