Definitions.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Definitions.h
  3. * RVO2-3D Library
  4. *
  5. * Copyright 2008 University of North Carolina at Chapel Hill
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * https://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. *
  19. * Please send all bug reports to <geom@cs.unc.edu>.
  20. *
  21. * The authors may be contacted via:
  22. *
  23. * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha
  24. * Dept. of Computer Science
  25. * 201 S. Columbia St.
  26. * Frederick P. Brooks, Jr. Computer Science Bldg.
  27. * Chapel Hill, N.C. 27599-3175
  28. * United States of America
  29. *
  30. * <https://gamma.cs.unc.edu/RVO2/>
  31. */
  32. /**
  33. * \file Definitions.h
  34. * \brief Contains functions and constants used in multiple classes.
  35. */
  36. #ifndef RVO3D_DEFINITIONS_H_
  37. #define RVO3D_DEFINITIONS_H_
  38. namespace RVO {
  39. /**
  40. * \brief Computes the square of a float.
  41. * \param scalar The float to be squared.
  42. * \return The square of the float.
  43. */
  44. inline float sqr(float scalar)
  45. {
  46. return scalar * scalar;
  47. }
  48. }
  49. #endif /* RVO3D_DEFINITIONS_H_ */