Rename repository to 'omath'

This commit is contained in:
Brendan Zabarauskas 2012-09-08 18:54:32 +10:00
parent cbc3bcea33
commit 413a5ff047
9 changed files with 52 additions and 27 deletions

View file

@ -1,10 +1,30 @@
# adapted from https://github.com/z0w0/rusty-math/blob/master/Makefile TARGET = omath
ROOT_DIR = .
SRC_DIR = $(ROOT_DIR)/src
SRC_CRATE = $(TARGET).rc
BUILD_DIR = $(ROOT_DIR)/lib
TEST = test_$(TARGET)
TEST_DIR = $(ROOT_DIR)/test
TEST_BUILD_DIR = $(TEST_DIR)/build
TEST_CRATE = $(TEST).rc
$(TARGET):
@echo "Building $(TARGET)"
@rustc $(SRC_DIR)/$(SRC_CRATE) --lib -g --out-dir=$(BUILD_DIR)
@echo "Success! \o/"
all: $(TARGET)
all:
rustc src/om3d.rc --lib --out-dir=lib
test: all test: all
rustc --test -L lib test/test_om3d.rc -o test/build/test_om3d.elf @echo "..."
./test/build/test_om3d.elf @echo "Building $(TEST)"
@rustc --test -L lib $(TEST_DIR)/$(TEST_CRATE) -g --out-dir=$(TEST_BUILD_DIR)
@echo "Success! \o/"
@$(TEST_BUILD_DIR)/$(TEST)
clean: clean:
rm -R -f ./lib/* rm -R -f $(BUILD_DIR)/*
rm -R -f ./test/build/* rm -R -f $(TEST_BUILD_DIR)/*

View file

@ -440,6 +440,7 @@ impl mat3: Matrix3<float, vec3> {
y = self[1][2] - self[2][1] * s; y = self[1][2] - self[2][1] * s;
z = self[0][1] - self[1][0] * s; z = self[0][1] - self[1][0] * s;
} }
return quat(w, x, y, z);
} }
} }

View file

@ -1,4 +1,4 @@
#[link(name = "om3d", #[link(name = "omath",
vers = "0.1", vers = "0.1",
author = "Brendan Zabarauskas")]; author = "Brendan Zabarauskas")];

View file

@ -1,10 +0,0 @@
{
"folders":
[
{
"path": "../",
"file_exclude_patterns": ["*.sublime-workspace"],
"folder_exclude_patterns": ["*.dSYM"]
}
]
}

View file

@ -0,0 +1,14 @@
{
"folders":
[
{
"path": "../",
"file_exclude_patterns": ["*.sublime-workspace"],
"folder_exclude_patterns": ["*.dSYM"]
},
{
"path": "/usr/local/src/rust/src",
"name": "rust"
}
]
}

View file

@ -1,5 +1,5 @@
import om3d::mat::*; import omath::mat::*;
import om3d::vec::*; import omath::vec::*;
// TODO // TODO

View file

@ -1,12 +1,12 @@
#[link(name = "om3d-test", #[link(name = "test_omath",
vers = "0.1", vers = "0.1",
author = "Brendan Zabarauskas")]; author = "Brendan Zabarauskas")];
#[comment = "Unittests for om3d"]; #[comment = "Unittests for omath"];
#[crate_type = "unittests"]; #[crate_type = "unittests"];
use std; use std;
use om3d; use omath;
mod test_mat; mod test_mat;
mod test_math; mod test_math;

View file

@ -1,6 +1,6 @@
import om3d::mat::*; import omath::mat::*;
import om3d::quat::*; import omath::quat::*;
import om3d::vec::*; import omath::vec::*;
// TODO // TODO

View file

@ -1,5 +1,5 @@
import std::cmp::FuzzyEq; import std::cmp::FuzzyEq;
import om3d::vec::*; import omath::vec::*;
// TODO // TODO