21 Commits

Author SHA1 Message Date
be9cd149ac Fixing the Vector example to be easier to read. 2017-07-01 15:39:28 -04:00
0230b18624 Fixed a lot of the cargo tests. This required Real functions to use libc. 2017-07-01 15:32:44 -04:00
43a1e30808 Added the basic trigonometric functions.
These were moved to their own trait and removed from the definition of
a Real number. This allows the definition of a trigonometric function
to call a different libc trig function depending on type.
2017-06-27 18:19:33 -04:00
cbde731b74 Dot product is not a calculation of angle.
In my sleepy and sick state, I did not check on the actual return of
the dot product. As such, I relied on what I had remembered it being.
I had thought that it was the angle between two vectors, but this is
wrong and that is a separate formula that uses the dot product to
determine the angle in Euclidean space. So the change to Radians,
and all the messy extra type definitions, were unneeded. The only
operation that really needed the addition of the Radian type was the
angle operation.
2016-12-10 16:09:09 -05:00
40f5c0f462 Added Radians and Degrees to the trig module.
These types allow the correct tracking of the type of angle measurement
being used.
2016-12-01 01:15:24 -05:00
Jason Travis Smith
b51a93fc01 Committing the current files prior to reformatting. 2016-06-27 18:22:52 -04:00
Jason Smith
449ef9a149 Merge branch 'master' of gitlab.com:CyberMages/sigils
Conflicts:
	src/number.rs
2016-05-12 15:53:59 -04:00
Jason Smith
0b7a338572 Added the ability for vectors to use assignment operators.
This added the AddAssign, SubAssign, MulAssign, DivAssign, and RemAssign.
This needs to be looked at a little further to see if the other functions
need to removed now.
2016-05-12 15:49:24 -04:00
Jason Travis Smith
e64c3b0fbe Added Debug, Display, and Default to Vectors and Quaternions.
This also adds an example for Vectors and Quaternions.
2016-01-07 17:42:23 -05:00
Jason Travis Smith
9306a73f9a Added the Zero and One traits to sigils.
It looks like these may be removed from the standard library soon.
2016-01-06 05:59:38 -05:00
Jason Travis Smith
04e744fb0f Removing the recent addition of Number::BYTES.
This really does not have anything to do with a Number. This has to
deal with the byte representation of certain types and as such it should
really live in the Alchemy crate.
2016-01-06 03:14:58 -05:00
Jason Travis Smith
4aa410ad7e Making the associated constant Number::BYTES a usize.
As much as I prefer to have tighter types for variables,
this seems to make writing code easier and cleaner.
2016-01-06 02:04:23 -05:00
Jason Travis Smith
946ad90fa0 Numbers now define how many bytes it takes to represent them.
Numbers now have an associated constant value that defines how many
bytes it takes to define them.
2016-01-06 00:54:44 -05:00
Jason Travis Smith
902aeb5dbe This adds get_size() to all vector implementations.
get_size() was added so that vectors could all be converted to Vector4
when being turned into binary values.

from_str_radix() for floating point numbers was deprecated from the
standard library. Until there is time to write our own implementation
of this floating point numbers will panic on non base 10 string
conversion. Base 10 string conversion will use the from_str function.
2015-12-31 02:58:21 -05:00
Jason Smith
a618fb27f7 Removing the gitlab ci ability.
This would be great once we have a full lab with a server and a couple
testing environments, but for now this would require resources we
can't spare since the gitlab shared runners do not work for both windows
and linux.
2015-12-02 04:11:56 -05:00
Jason Smith
460528dea7 Attempting to get the rust code to build on the default runners. 2015-12-02 03:06:09 -05:00
Jason Smith
b6453cccfe Initial attempt at getting the library to use continual integration.
This will attempt to get the linux build to work on the gitlab
shared runner ci system.
2015-12-02 03:02:45 -05:00
Jason Smith
7fd08542e9 This commit moves the library into a usable state.
There is still some work to do with defining
integers and whole numbers better, but for now
the library is usable and reasonably tested.
2015-12-01 15:48:02 -05:00
Jason Travis Smith
7ae702fd5c Finished the Vector definition.
This complete what is needed for the definition of Vector2, Vector3, and Vector4.

This required a trigonometry section, fleshing out the rest of the Number, ToNumber,
and FromNumber section, correctly defining all the available function for the Real
trait, and defining several constants.
2015-10-09 13:02:54 -04:00
Jason Travis Smith
e410e69e2f Fixed up some tests and wrote some documentation.
Also, .swp files are now ignored.
2015-10-04 23:33:37 -04:00
Jason Travis Smith
0160780bd1 Created a new math library.
This library will e the math library of the magic game engine.

Currently, it defines basic numerical types that can be used in generic programming
and a set of generic Vector structures.

Tests can be added to the "tests" crate.
2015-10-04 02:59:26 -04:00