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
// Returns the INVERSE inertia tensor in GLOBAL space (not local!) | |
// Returns a Matrix3x3, but there's no type for that, so waste some space with a Matrix4x4 | |
// Equivalent to GetInertiaTensorGlobal(rb).inverse, but faster | |
private static Matrix4x4 GetInverseInertiaTensorGlobal(Rigidbody rb) { | |
Vector3 inertiaTensor = rb.inertiaTensor; | |
Vector3 inverseInertiaTensor = new(1 / inertiaTensor.x, 1 / inertiaTensor.y, 1 / inertiaTensor.z); | |
Matrix4x4 rotation = Matrix4x4.Rotate(rb.rotation * rb.inertiaTensorRotation); | |
// rotation is orthonormal, so inverse=transpose | |
return rotation * Matrix4x4.Scale(inverseInertiaTensor) * rotation.transpose; | |
} |
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
using System.Collections; | |
using UnityEngine; | |
namespace UnityEngine | |
{ | |
public interface ICustomYieldInstruction : IEnumerator | |
{ | |
public bool keepWaiting { get; } | |
object IEnumerator.Current => null; |
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
using System; | |
public class C { | |
public static void Main() { | |
var arr = Array.CreateInstance(typeof(int), new[]{5}, new[]{5}); | |
Console.WriteLine(arr.Length); | |
for (var i = 5; i < 10; i++) | |
arr.SetValue(i * 2, i); | |
for (var i = 5; i < 10; i++) | |
Console.WriteLine(arr.GetValue(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
khyperia@argon ~/me/jsparagus/rust/driver % cargo run | |
Finished dev [unoptimized + debuginfo] target(s) in 0.00s | |
Running `/home/khyperia/me/jsparagus/rust/target/debug/driver` | |
> 2+2 | |
{ | |
"Script": { | |
"directives": [], | |
"statements": [ | |
{ | |
"ExpressionStatement": { |
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
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
[user] | |
email = [email protected] | |
name = Ashley Hauck | |
[commit] | |
gpgsign = false |
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
diff --git a/moz.configure b/moz.configure | |
index 2484ad553645..b15ef790e420 100755 | |
--- a/moz.configure | |
+++ b/moz.configure | |
@@ -645,14 +645,14 @@ def config_status_deps(build_env, build_project): | |
topsrcdir = build_env.topsrcdir | |
topobjdir = build_env.topobjdir | |
- if not build_env.topobjdir.endswith('js/src'): | |
+ if 'js/src' not in build_env.topobjdir: |
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 B { | |
constructor(x) { | |
console.log(x); | |
} | |
} | |
class C extends B { | |
} | |
new C("C"); // prints "C" |
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
// prints 1, 2, 3, 4 | |
function f(x) { | |
console.log(x); | |
} | |
class C { | |
static [f(1)] = f(3); | |
static [f(2)] = f(4); | |
} |
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 C extends B { | |
field = 2; | |
constructor() { | |
class D { | |
[super()]; | |
} | |
} | |
} | |
// --- |
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
js> dis(class c{x=2;}) | |
flags: CONSTRUCTOR | |
loc op | |
----- -- | |
00000: functionthis # THIS | |
00001: setlocal 0 # THIS | |
00005: pop # | |
main: | |
00006: getgname ".initializers" # .initializers | |
00011: zero # .initializers 0 |
NewerOlder