Allow vector as number in contextual operators.

This commit is contained in:
2023-02-21 18:42:58 +08:00
parent 5c4acd54ce
commit f04cd370f1

View File

@@ -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;