Skip to content

Commit 672ecd7

Browse files
authored
Remove hack of built-in constants (#154)
* build.xml: Add OS specific code Signed-off-by: Ce Gao <[email protected]> * core.R: Add more built-in constants Signed-off-by: Ce Gao <[email protected]> * examples: Remove hack of built-in constants Signed-off-by: Ce Gao <[email protected]>
1 parent 756868d commit 672ecd7

File tree

76 files changed

+86
-167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+86
-167
lines changed

examples/Basics/ThreeDimensionalCube/ThreeDimensionalCube.rpde

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
PI <- 3.1415
2-
31
settings <- function() {
42
size(500, 500, "processing.opengl.PGraphics3D")
53
}

examples/reference/ambientLight/ambientLight1/ambientLight1.rpde

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
PI <- pi
2-
31
settings <- function() {
42
size(100, 100, P3D)
53
}

examples/reference/applyMatrix/applyMatrix0/applyMatrix0.rpde

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
PI <- pi
2-
31
settings <- function() {
42
size(100, 100, P3D)
53
}

examples/reference/arc/arc1/arc1.rpde

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# arc 1 https://processing.org/reference/arc_.html
22

3-
# TODO: replace with built-in constants
4-
PI <- 3.1415
5-
HALF_PI <- PI/2
6-
QUARTER_PI <- PI/4
7-
TWO_PI <- PI * 2
8-
93
arc(50, 55, 50, 50, 0, HALF_PI)
104
noFill()
115
arc(50, 55, 60, 60, HALF_PI, PI)
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
11
# arc 2 https://processing.org/reference/arc_.html
22

3-
# TODO: replace with built-in constants
4-
PI <- 3.1415
5-
QUARTER_PI <- PI/4
6-
7-
# TODO: Fix double to int casts
8-
OPEN <- as.integer(1)
9-
CHORD <- as.integer(2)
10-
PIE <- as.integer(3)
11-
123
arc(50, 50, 80, 80, 0, PI + QUARTER_PI, OPEN)
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
11
# arc 3 https://processing.org/reference/arc_.html
22

3-
# TODO: replace with built-in constants
4-
PI <- 3.1415
5-
QUARTER_PI <- PI/4
6-
7-
# TODO: Fix double to int casts
8-
OPEN <- as.integer(1)
9-
CHORD <- as.integer(2)
10-
PIE <- as.integer(3)
11-
123
arc(50, 50, 80, 80, 0, PI + QUARTER_PI, CHORD)
Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
11
# arc 4 https://processing.org/reference/arc_.html
22

3-
# TODO: replace with built-in constants
4-
PI <- 3.1415
5-
HALF_PI <- PI/2
6-
QUARTER_PI <- PI/4
7-
TWO_PI <- PI * 2
8-
9-
# TODO: Fix double to int casts
10-
OPEN <- as.integer(1)
11-
CHORD <- as.integer(2)
12-
PIE <- as.integer(3)
13-
143
arc(50, 50, 80, 80, 0, PI + QUARTER_PI, PIE)

examples/reference/beginCamera/beginCamera0/beginCamera0.rpde

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
PI <- pi
2-
31
settings <- function() {
42
size(100, 100, P3D)
53
}

examples/reference/beginContour/beginContour1/beginContour1.rpde

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# beginContour 1 https://processing.org/reference/beginContour_.html
22

3-
CLOSE <- as.integer(2)
4-
53
size(100, 100)
64
translate(50, 50)
75
stroke(255, 0, 0)

examples/reference/beginShape/beginShape1/beginShape1.rpde

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# beginShape 1 https://processing.org/reference/beginShape_.html
22

3-
OPEN <- as.integer(1)
4-
CLOSE <- as.integer(2)
5-
POINTS <- as.integer(3)
6-
LINES <- as.integer(5)
7-
83
beginShape()
94
vertex(30, 20)
105
vertex(85, 20)

0 commit comments

Comments
 (0)