<commit_before>


#include "Bacteria.h"
#include "CellularAggregate.h"




namespace bio {


unsigned long Bacteria::GrowthMaxLatency    = 100; 
unsigned long Bacteria::DivisionMaxLatency  = 500; 


/**
 *    Constructor
 */ 
Bacteria
::Bacteria()
{
  // add a random time before starting to grow
  m_GrowthLatencyTime   = rand() % GrowthMaxLatency;
  m_DivisionLatencyTime = rand() % DivisionMaxLatency;
}







/**
 *    Destructor
 */ 
Bacteria
::~Bacteria()
{
}




/**
 *    Growth
 */ 
void
Bacteria
::Grow(void) 
{
  SuperClass::Grow();
}



/**
 *    Cell Division
 */ 
Cell *
Bacteria
::CreateNew()
{
  Bacteria * bacteria = new Bacteria;
  bacteria->m_ParentIdentifier = m_SelfIdentifier;
  return bacteria;
}



/**
 *    Cell Division
 *    This is a terminal operation. This cell will
 *    be destroyed in the process, and two new cell
 *    will be created.
 */ 
void
Bacteria
::Divide(void) 
{
  SuperClass::Divide();

  Bacteria * siblingA = dynamic_cast<Bacteria*>( this->CreateNew() );
  Bacteria * siblingB = dynamic_cast<Bacteria*>( this->CreateNew() );

  siblingA->m_Radius   = m_Radius / sqrt( 2.0f );
  siblingB->m_Radius   = m_Radius / sqrt( 2.0f );

  siblingA->m_Generation = m_Generation + 1;
  siblingB->m_Generation = m_Generation + 1;

  // Create a perturbation for separating the daugther cells
  double angle = static_cast<double>( rand() ) / 
                 static_cast<double>( RAND_MAX ) *
                 atan(1) * 4.0;

  Cell::VectorType perturbationVector;
  double perturbationLength = m_Radius * 0.75;
<commit_msg>FIX: Now specifying that atan() is called over a float type : atan(1.0f)<commit_after>


#include "Bacteria.h"
#include "CellularAggregate.h"




namespace bio {


unsigned long Bacteria::GrowthMaxLatency    = 100; 
unsigned long Bacteria::DivisionMaxLatency  = 500; 


/**
 *    Constructor
 */ 
Bacteria
::Bacteria()
{
  // add a random time before starting to grow
  m_GrowthLatencyTime   = rand() % GrowthMaxLatency;
  m_DivisionLatencyTime = rand() % DivisionMaxLatency;
}







/**
 *    Destructor
 */ 
Bacteria
::~Bacteria()
{
}




/**
 *    Growth
 */ 
void
Bacteria
::Grow(void) 
{
  SuperClass::Grow();
}



/**
 *    Cell Division
 */ 
Cell *
Bacteria
::CreateNew()
{
  Bacteria * bacteria = new Bacteria;
  bacteria->m_ParentIdentifier = m_SelfIdentifier;
  return bacteria;
}



/**
 *    Cell Division
 *    This is a terminal operation. This cell will
 *    be destroyed in the process, and two new cell
 *    will be created.
 */ 
void
Bacteria
::Divide(void) 
{
  SuperClass::Divide();

  Bacteria * siblingA = dynamic_cast<Bacteria*>( this->CreateNew() );
  Bacteria * siblingB = dynamic_cast<Bacteria*>( this->CreateNew() );

  siblingA->m_Radius   = m_Radius / sqrt( 2.0f );
  siblingB->m_Radius   = m_Radius / sqrt( 2.0f );

  siblingA->m_Generation = m_Generation + 1;
  siblingB->m_Generation = m_Generation + 1;

  // Create a perturbation for separating the daugther cells
  double angle = static_cast<double>( rand() ) / 
                 static_cast<double>( RAND_MAX ) *
                 atan(1.0f) * 4.0;

  Cell::VectorType perturbationVector;
  double perturbationLength = m_Radius * 0.75;

{'fraction_non_alphanumeric': 0.12429378531073447, 'fraction_numerical': 0.01224105461393597, 'mean_word_length': 3.133592736705577, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 25, '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': '6480372', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1060, 'n_words': 257}