<commit_before>import React from 'react'

const Triangle = React.createClass({

  polarToCartesian: function(r, degrees){
    let theta = degrees * Math.PI / 180
    let x = r/2 * Math.cos(theta)
    let y = r/2 * Math.sin(theta)
    return [x, y]
  },

  getMovement: function(length, rotation, smallest){
    let x_y = this.polarToCartesian(length, rotation)

    // We want all the triangles to have the same center point x_y
    // To do this we offset the bottom positioning by 
    // current_triangle.length - smallest_triangle_length / 2 
    let bottom = x_y[0] - ((length - smallest) / 2)
    let left = x_y[1]
    
    return {
      left: left, 
      bottom: bottom
    }
  },

  getStyle: function(length, rotation, smallest){
    let movement = this.getMovement(length, rotation, smallest)<commit_msg>adding a minimum length<commit_after>import React from 'react'

const Triangle = React.createClass({

  polarToCartesian: function(r, degrees){
    let theta = degrees * Math.PI / 180
    let x = r/2 * Math.cos(theta)
    let y = r/2 * Math.sin(theta)
    return [x, y]
  },

  getMovement: function(length, rotation, smallest){
    let x_y = this.polarToCartesian(length, rotation)

    // We want all the triangles to have the same center point x_y
    // To do this we offset the bottom positioning by 
    // current_triangle.length - smallest_triangle_length / 2 
    let bottom = x_y[0] - ((length - smallest) / 2)
    let left = x_y[1]
    
    return {
      left: left, 
      bottom: bottom
    }
  },

  getStyle: function(length, rotation, smallest){
    // Set minimum length
    length        = length + 100
    let movement  = this.getMovement(length, rotation, smallest)
{'fraction_non_alphanumeric': 0.1045828437132785, 'fraction_numerical': 0.012338425381903642, 'mean_word_length': 2.742857142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2732659', 'n_tokens_mistral': 562, 'n_tokens_neox': 521, 'n_words': 170}