Allow vector as number in contextual operators.
This commit is contained in:
@@ -563,7 +563,7 @@ namespace Cryville.Crtr {
|
|||||||
if (src == null) throw new ArgumentNullException("src");
|
if (src == null) throw new ArgumentNullException("src");
|
||||||
int type; byte[] value;
|
int type; byte[] value;
|
||||||
src.Get(out type, out value);
|
src.Get(out type, out value);
|
||||||
if (type != PdtInternalType.Number)
|
if (type != PdtInternalType.Number && type != PdtInternalType.Vector)
|
||||||
throw new ArgumentException("Not a number");
|
throw new ArgumentException("Not a number");
|
||||||
fixed (byte* ptr = value) {
|
fixed (byte* ptr = value) {
|
||||||
return *(float*)ptr;
|
return *(float*)ptr;
|
||||||
|
Reference in New Issue
Block a user