LikeLike

]]>LikeLike

]]>LikeLike

]]>LikeLike

]]>public Quaternion ToUnityQuaternion(){

return new Quaternion (w, x, y, z);

}

Unity defines the Quaternion elements in a different order:

public Quaternion(float x, float y, float z, float w);

This little problem would explain why you had to stretch the maths a bit to make the example work in the final part of the code.

LikeLike

]]>P. = ZZ.quo(2)[] # Polynomial Ring over Z/2Z in X

p = X**3 + X**2 + 1 # some Polynom in P

R = P.quo(p) # quotient polynomial ring

MS = MatrixSpace(R, 2) # matrix space over R

M = MS.random_element() # some random matrix

[x for x in MS if (x.transpose()*M*x).is_one()] # List of results

LikeLike

]]>R = ZZ.quo(5) # Saving the Ring for convenience

MS = MatrixSpace(R, 2) # Space of 2×2-Mat. over Z/5Z

M = matrix(R, 2, [2,0,0,3]) # Def. Matrix

[x for x in MS if (x.transpose()*M*x).is_one()] # List of results

LikeLike

]]>LikeLike

]]>LikeLike

]]>LikeLike

]]>