Exemplo n.º 1
0
Prectangle::Prectangle(float x1, float y1, float x2, float y2)
{
	this->x1=x1;
	this->y1=y1;
	this->x2=x2;
	this->y2=y2;
	calcValues();
}
Exemplo n.º 2
0
Missile::Missile(int velocity, int angle) {
    initialVelocity = velocity;
    angleDegrees = angle;
    degreesToRadians();
    calcXVelocity();
    calcinitYVelocity();
    findYVeloc();
    if (angleDegrees < 90) calcValues();
    else calcNegXValues();
}
Exemplo n.º 3
0
void presResult( gpointer data )
{
  float resistors[3] = {0,0,0};
  char conn         = gtk_toggle_button_get_active((GtkToggleButton *) radioSerial) ? 'S': 'P';
  int nrOfResistors = gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( entryNr ) );
  float voltage     = gtk_spin_button_get_value( GTK_SPIN_BUTTON( entryV ) );
  resistors[0]       = gtk_spin_button_get_value( GTK_SPIN_BUTTON( entryR1 ) );
  resistors[1]       = gtk_spin_button_get_value( GTK_SPIN_BUTTON( entryR2 ) );
  resistors[2]       = gtk_spin_button_get_value( GTK_SPIN_BUTTON( entryR3 ) );
  calcValues(nrOfResistors,conn,voltage,resistors);
  showPopUpWithResult();
}
Exemplo n.º 4
0
Ptriangle::Ptriangle(float x1,float y1,float z1, float x2,float y2, float z2, float x3, float y3,float z3){
	this->x1 =x1;
	this->y1 =y1;
	this->z1 =z1;
	this->x2 =x2;
	this->y2 =y2;
	this->z2 =z2;
	this->x3 =x3;
	this->y3 =y3;
	this->z3 =z3;
	calcValues();
}