Current version: 1.0.19 1.0.15 (as of 2018-12-10)
This file contains 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
using UnityEngine; | |
using System.Collections; | |
// Author: Eric Eastwood (ericeastwood.com) | |
// | |
// Description: | |
// Written for this gd.se question: http://gamedev.stackexchange.com/a/75748/16587 | |
// Simulates/Emulates pendulum motion in code | |
// Works in any 3D direction and with any force/direciton of gravity | |
// |
This file contains 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
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
using System.Reflection; | |
using self = MLMEditorGUI; | |
using System.Collections.Generic; | |
public class MLMEditorGUI : MonoBehaviour { |
This file contains 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
const std = @import("std"); | |
pub fn main() void { | |
var list = [_]u8{ 1, 2, 3, 4, 5, 6, 7, 8, 9 }; | |
// `i = i -% 1` is wrapping subtraction. | |
// `i -%= 1` | |
var i: u32 = list.len - 1; | |
while (i < list.len) : (i -%= 1) { | |
std.log.debug("i: {d} list[{d}] -> {d}", .{ i, i, list[i] }); |
Autodesk Fusion 360 is free for personal use. It is a CAD program like Autodesk Inventor(which can be free if you have a .edu
student school email address). I was familiar with Inventor and found Fusion 360 pretty similar with nice parametric modeling.
- You can have multiple components in one design (and apply some assembly contraints)
- For the blueprint type view that you can annotate and add dimensions, it is called a "drawing"
This file contains 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
const std = @import("std"); | |
// See "a ++ b" in the Zig docs: https://ziglang.org/documentation/master/#Operators | |
pub fn main() void { | |
std.log.debug( | |
"We can split up a really long string across multiple lines in Zig using " ++ | |
"the ++ operator which works on comptime known arrays. Since comptime " ++ | |
"strings look like `[100:0]const u8` indicating a null terminated array of " ++ | |
"integers that is 100 characters long, this works just fine.", | |
.{}, |
This file contains 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
const std = @import("std"); | |
const expect = std.testing.expect; | |
const expectEqual = std.testing.expectEqual; | |
const expectEqualSlices = std.testing.expectEqualSlices; | |
// Tested with Zig 0.11.0 | |
// `zig run x11-flexible-array-member-parsing.zig` | |
// This is a barebones example from zigx and the code to parse the connection setup buffer, | |
// https://github.com/marler8997/zigx/blob/a313162bdac3182c7fc38a31dfa952c68ff861f9/x.zig#L2386-L2481 |
NewerOlder