comparison org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet195.d @ 112:9f4c18c268b2

Update to compile and execute with dmd 2.052.
author kntroh
date Wed, 16 Mar 2011 21:53:53 +0900
parents 69b1fa94a4a8
children 536e43f63c81
comparison
equal deleted inserted replaced
111:b6e9904989ed 112:9f4c18c268b2
35 import org.eclipse.swt.opengl.GLData; 35 import org.eclipse.swt.opengl.GLData;
36 36
37 import derelict.opengl.gl; 37 import derelict.opengl.gl;
38 import derelict.opengl.glu; 38 import derelict.opengl.glu;
39 39
40 import Math = tango.math.Math; 40 version(Tango){
41 import Math = tango.math.Math;
42 } else { // Phobos
43 import Math = std.math;
44 }
41 45
42 void drawTorus(float r, float R, int nsides, int rings) 46 void drawTorus(float r, float R, int nsides, int rings)
43 { 47 {
44 float ringDelta = 2.0f * cast(float) Math.PI / rings; 48 float ringDelta = 2.0f * cast(float) Math.PI / rings;
45 float sideDelta = 2.0f * cast(float) Math.PI / nsides; 49 float sideDelta = 2.0f * cast(float) Math.PI / nsides;