Skip to content

Commit c126f47

Browse files
committed
Converting some tabs into spaces within the graphics chapter
1 parent 2e28d29 commit c126f47

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

chapters/intro_to_graphics/chapter.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ for (int r=0; r<numRects; r++) {
160160
// x = cos(polar angle) * (polar distance)
161161
// y = sin(polar angle) * (polar distance)
162162

163-
// We need our angle to be in radians if we want to use sin() or cos()
164-
// so we can make use of an openFrameworks function to convert from degrees
165-
// to radians
166-
float angle = ofRandom(ofDegToRad(360.0));
163+
// We need our angle to be in radians if we want to use sin() or cos()
164+
// so we can make use of an openFrameworks function to convert from degrees
165+
// to radians
166+
float angle = ofRandom(ofDegToRad(360.0));
167167

168168
float xOffset = cos(angle) * distance;
169169
float yOffset = sin(angle) * distance;
@@ -384,7 +384,7 @@ In the `keyPressed(...)` function, add the following:
384384
if (key == 's') {
385385
// It's strange that we can compare the int key to a character like `s`, right? Well, the super short
386386
// explanation is that characters are represented by numbers in programming. `s` and 115 are the same
387-
// thing. If you want to know more, look check out the wiki for ASCII.
387+
// thing. If you want to know more, look check out the wiki for ASCII.
388388
glReadBuffer(GL_FRONT); // HACK: only needed on windows, when using ofSetAutoBackground(false)
389389
ofSaveScreen("savedScreenshot_"+ofGetTimestampString()+".png");
390390
}
@@ -512,8 +512,8 @@ Let's add points to our polyline in `update()`:
512512
if (leftMouseButtonPressed) {
513513
ofVec2f mousePos(ofGetMouseX(), ofGetMouseY());
514514
if (lastPoint.distance(mousePos) >= minDistance) {
515-
// a.distance(b) calculates the Euclidean distance between point a and b. It's
516-
// the straight line distance between the points.
515+
// a.distance(b) calculates the Euclidean distance between point a and b. It's
516+
// the straight line distance between the points.
517517
currentPolyline.curveTo(mousePos); // Here we are using an ofVec2f with curveTo(...)
518518
lastPoint = mousePos;
519519
}
@@ -682,7 +682,7 @@ void ofApp::draw(){
682682
ofBeginSaveScreenAsPDF("savedScreenshot_"+ofGetTimestampString()+".pdf");
683683
}
684684
685-
// Drawing code omitted for clarity...
685+
// Drawing code omitted for clarity...
686686
687687
// Finish saving the PDF and reset the isSavingPDF flag to false
688688
// Ending the PDF tells openFrameworks to resume drawing to the screen.
@@ -758,9 +758,9 @@ So what we need is to reset the coordinate system using [`ofPushMatrix()`](http:
758758
for (int rows=0; rows<10; rows++) {
759759
ofPushMatrix(); // Save the coordinate system before we shift it horizontally
760760

761-
// It is often helpful to indent any code in-between push and pop matrix for readability
761+
// It is often helpful to indent any code in-between push and pop matrix for readability
762762

763-
// Loop and draw a row (code omitted)
763+
// Loop and draw a row (code omitted)
764764

765765
ofPopMatrix(); // Return to the coordinate system before we shifted it horizontally
766766
ofTranslate(0, 200);

0 commit comments

Comments
 (0)