Rename repository to 'omath'
This commit is contained in:
parent
cbc3bcea33
commit
413a5ff047
9 changed files with 52 additions and 27 deletions
34
Makefile
34
Makefile
|
@ -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
|
||||
rustc --test -L lib test/test_om3d.rc -o test/build/test_om3d.elf
|
||||
./test/build/test_om3d.elf
|
||||
@echo "..."
|
||||
@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:
|
||||
rm -R -f ./lib/*
|
||||
rm -R -f ./test/build/*
|
||||
rm -R -f $(BUILD_DIR)/*
|
||||
rm -R -f $(TEST_BUILD_DIR)/*
|
|
@ -440,6 +440,7 @@ impl mat3: Matrix3<float, vec3> {
|
|||
y = self[1][2] - self[2][1] * s;
|
||||
z = self[0][1] - self[1][0] * s;
|
||||
}
|
||||
return quat(w, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#[link(name = "om3d",
|
||||
#[link(name = "omath",
|
||||
vers = "0.1",
|
||||
author = "Brendan Zabarauskas")];
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"folders":
|
||||
[
|
||||
{
|
||||
"path": "../",
|
||||
"file_exclude_patterns": ["*.sublime-workspace"],
|
||||
"folder_exclude_patterns": ["*.dSYM"]
|
||||
}
|
||||
]
|
||||
}
|
14
sublime/omath.sublime-project
Normal file
14
sublime/omath.sublime-project
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"folders":
|
||||
[
|
||||
{
|
||||
"path": "../",
|
||||
"file_exclude_patterns": ["*.sublime-workspace"],
|
||||
"folder_exclude_patterns": ["*.dSYM"]
|
||||
},
|
||||
{
|
||||
"path": "/usr/local/src/rust/src",
|
||||
"name": "rust"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
import om3d::mat::*;
|
||||
import om3d::vec::*;
|
||||
import omath::mat::*;
|
||||
import omath::vec::*;
|
||||
|
||||
// TODO
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#[link(name = "om3d-test",
|
||||
#[link(name = "test_omath",
|
||||
vers = "0.1",
|
||||
author = "Brendan Zabarauskas")];
|
||||
|
||||
#[comment = "Unittests for om3d"];
|
||||
#[comment = "Unittests for omath"];
|
||||
#[crate_type = "unittests"];
|
||||
|
||||
use std;
|
||||
use om3d;
|
||||
use omath;
|
||||
|
||||
mod test_mat;
|
||||
mod test_math;
|
|
@ -1,6 +1,6 @@
|
|||
import om3d::mat::*;
|
||||
import om3d::quat::*;
|
||||
import om3d::vec::*;
|
||||
import omath::mat::*;
|
||||
import omath::quat::*;
|
||||
import omath::vec::*;
|
||||
|
||||
// TODO
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import std::cmp::FuzzyEq;
|
||||
import om3d::vec::*;
|
||||
import omath::vec::*;
|
||||
|
||||
// TODO
|
||||
|
||||
|
|
Loading…
Reference in a new issue