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
| // by dave @beesandbombs :) | |
| float[][] result; | |
| float t, c; | |
| float ease(float p) { | |
| p = c01(p); | |
| return 3*p*p - 2*p*p*p; | |
| } |
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
| class Tree | |
| attr_reader :val, :left, :right | |
| def self.empty | |
| EmptyTree.new | |
| end | |
| def self.leaf(val) | |
| new(val, empty, empty) | |
| end |
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
| class DDCControl | |
| { | |
| public: | |
| DDCControl() | |
| : _gpu_handle(NULL) | |
| , _display_id(0) | |
| { | |
| initNv(); | |
| } |
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
| -- Make Sketch use the middle mouse button for dragging like Figma, Fusion 360, etc. | |
| local middleMouseDown = false | |
| -- Function to handle the middle mouse down event | |
| local function middleMouseDownHandler(event) | |
| if event:getType() == hs.eventtap.event.types.otherMouseDown then | |
| if event:getProperty(hs.eventtap.event.properties['mouseEventButtonNumber']) == 2 then | |
| middleMouseDown = true | |
| -- Simulate holding down the space bar | |
| hs.eventtap.event.newKeyEvent(hs.keycodes.map['space'], true):post() |
OlderNewer