¡@

Home 

2014/10/15 ¤U¤È 10:14:13

iphone Programming Glossary: sinf

where to start with audio synthesis on iPhone

http://stackoverflow.com/questions/2067267/where-to-start-with-audio-synthesis-on-iphone

kLeftWave .fStep float fStepR m_waves kRightWave .fStep for int s 0 s kBufferSizeInFrames 2 s 2 float sampleL volumeL sinf phaseL float sampleR volumeR sinf phaseR short sampleIL int sampleL 32767.0 short sampleIR int sampleR 32767.0 coreAudioBuffer.. kRightWave .fStep for int s 0 s kBufferSizeInFrames 2 s 2 float sampleL volumeL sinf phaseL float sampleR volumeR sinf phaseR short sampleIL int sampleL 32767.0 short sampleIR int sampleR 32767.0 coreAudioBuffer s sampleIL coreAudioBuffer..

Rotate a Sprite on a bezier path with touch - Cocos2D/Box2D

http://stackoverflow.com/questions/7494795/rotate-a-sprite-on-a-bezier-path-with-touch-cocos2d-box2d

an arc that subtends the same total angle but is centered on the X axis float a a2 a1 2.0 float x4 r cosf a float y4 r sinf a float x1 x4 float y1 y4 float k 0.5522847498 float f k tan a float x2 x1 f y4 float y2 y1 f x4 float x3 x2 float y3 y2.. by computing x1 y1 and x4 y4 and rotating the control points by a a1 float ar a a1 float cos_ar cosf ar float sin_ar sinf ar return NSArray arrayWithObjects NSNumber numberWithFloat r cosf a1 startPoint.x NSNumber numberWithFloat r sinf a1.. sinf ar return NSArray arrayWithObjects NSNumber numberWithFloat r cosf a1 startPoint.x NSNumber numberWithFloat r sinf a1 startPoint.y NSNumber numberWithFloat x2 cos_ar y2 sin_ar ctrlPoint1.x NSNumber numberWithFloat x2 sin_ar y2 cos_ar..