This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0:qstate(rand) | |
| 1:qstate(bell) | |
| 2:superposition(Q0, Q1) | |
| 3:cnot(Q2, 1, 2) | |
| 4:hadamard(Q3, 1) | |
| 5:partialmeasure(Q4, 1, 2) | |
| 6:choose1(Q5, B5, identity(), not(1), pauliz(1), not(1) |> pauliz(1)) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a + b * (d + e) * f | |
| add(a, multiply(b, multiply(add(d, e), f))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Code which is run at the top most level, or the render method | |
| //'lightsource' interchangable with 'point in which the rays come out of' | |
| float jitter = 0.02f; | |
| //Arraylist for multiple 'lightsources'; The 360/45 is so I can have 8 lightsources in a circle around the center lightsource | |
| ArrayList<ArrayList<Vec2f>> raycasts = new ArrayList<>(360/45 + 1); | |
| //Arraylist of the points for all the lightsources | |
| ArrayList<Vec2f> castPoints = new ArrayList<>(); | |
| //Loop to make the 8 surrounding lightsources | |
| for(int i = 0; i < 8; ++i){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |