Restored from previous forum. Originally posted by halo.
I wrote a plugin for my editor to make a cylinder of any number of sides. However, my shapes are coming out all lopsided. Could PB's sin and cos functions be to blame?
I hear sin() and cos() are inaccurate.
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Pupil.
Also make sure that you use radians for the angle and not degrees i.e:
1 [degree] = 2*pi/360 [radian]
Edited by - Pupil on 04 August 2002 11:27:16
Well you can easily compare PB's result with that of a scientific calculator if they differ significantly one of them is wrong, fortunately most calculators don't give wrong answers.....I wrote a plugin for my editor to make a cylinder of any number of sides. However, my shapes are coming out all lopsided. Could PB's sin and cos functions be to blame?
Also make sure that you use radians for the angle and not degrees i.e:
1 [degree] = 2*pi/360 [radian]
Edited by - Pupil on 04 August 2002 11:27:16
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm