<commit_before>//
// Copyright (c) 2012 <NAME> <EMAIL>
// This file is part of minimath.
// Subject to the Lesser GNU Public License 
// - see < http://www.gnu.org/licenses/lgpl.html>
//


#ifndef MATH_TRANSLATION3D_H__
#define MATH_TRANSLATION3D_H__

#include "Math/Point3D.h"

namespace Math {

class Translation3D {

 public:
  Translation3D() {}
  template <typename Vector>
  explicit Translation3D(const Vector& v) : m_trans(v) {}
  Translation3D(double x, double y, double z) : m_trans(x,y,z) {}
  template <typename Point>
  Point operator*(const Point& point) const {
    // apply a translation
    return Point( point + m_trans );
  }

  bool operator==(const Translation3D& rhs) 
  {
    return m_trans == rhs.m_trans;
  }
  bool operator!=(const Translation3D& rhs)
  {
    return !operator==(rhs);<commit_msg>Add multiplication operator between Translation3D objects.<commit_after>//
// Copyright (c) 2012 <NAME> <EMAIL>
// This file is part of minimath.
// Subject to the Lesser GNU Public License 
// - see < http://www.gnu.org/licenses/lgpl.html>
//


#ifndef MATH_TRANSLATION3D_H__
#define MATH_TRANSLATION3D_H__

#include "Math/Point3D.h"

namespace Math {

class Translation3D {

 public:
  Translation3D() {}
  template <typename Vector>
  explicit Translation3D(const Vector& v) : m_trans(v) {}
  Translation3D(double x, double y, double z) : m_trans(x,y,z) {}
  template <typename Point>
  Point operator*(const Point& point) const {
    // apply a translation
    return Point( point + m_trans );
  }
  Translation3D operator*(const Translation3D& rhs) const {
    // apply a translation
    return Translation3D( m_trans + rhs.m_trans );
  }


  bool operator==(const Translation3D& rhs) 
  {
    return m_trans == rhs.m_trans;
  }
  bool operator!=(const Translation3D& rhs)
  {
    return !operator==(rhs);
{'fraction_non_alphanumeric': 0.1222707423580786, 'fraction_numerical': 0.016375545851528384, 'mean_word_length': 3.7242268041237114, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3930860', 'n_tokens_mistral': 642, 'n_tokens_neox': 611, 'n_words': 168}