#include <basepch.h>

#pragma hdrstop

#include "Divide.h"
#pragma package(smart_init)
//---------------------------------------------------------
// ValidCtrCheck is used to assure that the components
// created do not have  any pure virtual functions.
//

static inline void ValidCtrCheck(TDivide *)
{
        new TDivide(NULL);
}
//---------------------------------------------------------
__fastcall TDivide::TDivide(TComponent* Owner)
        : TComponent(Owner)
{
  FNumber1=1.0;
  FNumber2=1.0;
}
//---------------------------------------------------------
namespace Divide
{
  void __fastcall PACKAGE Register()
   {
     TComponentClass classes[1] = {__classid(TDivide)};
     RegisterComponents("Samples", classes, 0);
   }
}
//---------------------------------------------------------
void TDivide::Divide2Numbers()
{
  if (Number2 != 0)
    FResult= FNumber1/FNumber2;
      else
        FResult=FNumber1/1.1e+4932; //MaxExtended

}
//---------------------------------------------------------