Home

Math Functions: Radian To Cycle Conversion

     

Introduction

Extended __fastcall RadToCycle(Extended Radians);

The RadToCycle() function is used to convert the measurement of an angle from radians to cycles. This function is equivalent to using the formula Cycle = Radian / 2Pi.

Here is an example:

//---------------------------------------------------------------------------
void __fastcall TForm1::btnConversionClick(TObject *Sender)
{
	Extended Rad = StrToFloat(edtRadian->Text);
	Extended Cyc = RadToCycle(Rad);
	
	edtCycle->Text = FloatToStr(Cyc);
}
//---------------------------------------------------------------------------
Radian To Cycle Conversion
 

 

   
     
 

Home Copyright © 2010-2011 FunctionX, Inc.