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.
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.
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.
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.
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.
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.
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.
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.