<commit_before>use super::point::Point;

#[derive(Debug)]
pub struct Triangle {
   pub a: Point,
   pub b: Point,
   pub c: Point
}

impl Triangle {
   pub fn new(a: Point, b: Point, c: Point) -> Self {
      Triangle {
         a: a,
         b: b,
         c: c
      }
   }
}<commit_msg>Triangle orientation methods<commit_after>use std::mem;

use super::point::Point;

#[derive(Debug)]
pub struct Triangle {
   pub a: Point,
   pub b: Point,
   pub c: Point
}

impl Triangle {
   pub fn new(a: Point, b: Point, c: Point) -> Self {
      Triangle {
         a: a,
         b: b,
         c: c
      }
   }

   #[inline]
   pub fn clockwise(&self) -> bool {
      (self.b.x - self.a.x) * (self.c.y - self.a.y) < (self.c.x - self.a.x) * (self.b.y - self.a.y)
   }

   #[inline]
   pub fn change_orientation(&mut self) {
      mem::swap(&mut self.b, &mut self.c);
   }
}
{'fraction_non_alphanumeric': 0.1632183908045977, 'fraction_numerical': 0.0, 'mean_word_length': 1.993127147766323, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5408202', 'n_tokens_mistral': 342, 'n_tokens_neox': 343, 'n_words': 92}