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
;; component access, query and data | |
(ns forces.framework.component | |
) | |
;; support stuff | |
(defn dissoc-in | |
"Dissociates an entry from a nested associative structure returning a new | |
nested structure. keys is a sequence of keys. Any empty maps that result | |
will not be present in the new structure." | |
[m [k & ks :as keys]] |
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
;; TODO: deletion. warning when adding group to existing name. is this implemenation of groups a good thing? | |
(ns forces.framework.component | |
) | |
(def !nextEntityGUID (atom 1)) | |
(def !names (atom {})) | |
(def !nameReverseLookup (atom {})) ;; name to guid map | |
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
;; Develop your clojurescript program here | |
(ns metacirc.evaluator (:require [cljs.reader :as reader])) | |
;; TODO: | |
;; globals: "let", "do" | |
;; javascript interop | |
;; var args or at least get more than 4 for list | |
;; {} [] #{} '() | |
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
execute pathogen#infect() | |
set ignorecase | |
set smartcase | |
set hlsearch | |
set wildmenu | |
set showcmd | |
set nocompatible | |
syntax on | |
filetype plugin indent on | |
set shiftwidth=2 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
module TypedPools | |
export | |
Handle, | |
TypedPool, | |
StructPool, | |
MutableStructPool, | |
alloc!, | |
alloc_args!, | |
alloc_inplace!, |
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
// Example: | |
// ga_versor q = normalize(add(1.0, (ga_bivector){ .e12 = 1.0 })); | |
// see tests at end of file for more | |
#pragma once | |
#include <stdarg.h> | |
#include <complex.h> | |
#include <math.h> |
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
#include <iostream> | |
// Assume Vector3 is a simple 3D vector class with basic operations | |
struct Vector3 { | |
float x, y, z; | |
Vector3(float x_ = 0, float y_ = 0, float z_ = 0) : x(x_), y(y_), z(z_) {} | |
Vector3 operator+(const Vector3& v) const { return Vector3(x + v.x, y + v.y, z + v.z); } | |
Vector3 operator-(const Vector3& v) const { return Vector3(x - v.x, y - v.y, z - v.z); } | |
Vector3 operator*(float s) const { return Vector3(x * s, y * s, z * s); } |
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
# Geometric Algebra G(3) Library in Julia | |
# Types | |
struct G3Empty end | |
struct G3Vector{T<:Number} | |
e1::T | |
e2::T | |
e3::T | |
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
#include <iostream> | |
#include <cmath> | |
#include "Vector3.h" // Assumes Vector3 class with standard operations | |
// Function to compute gradients of kappa with respect to pa, pb, pc, pd | |
void computeGradients(const Vector3& pa, const Vector3& pb, const Vector3& pc, const Vector3& pd, | |
Vector3& grad_pa, Vector3& grad_pb, Vector3& grad_pc, Vector3& grad_pd) { | |
// Step 1: Compute edge vectors | |
Vector3 eca = pc - pa; // pc - pa | |
Vector3 eda = pd - pa; // pd - pa |
OlderNewer