Files
ueblueprint/js/entity/Integer64Entity.js
2023-01-03 22:53:17 +01:00

30 lines
572 B
JavaScript
Executable File

import IEntity from "./IEntity"
export default class Integer64Entity extends IEntity {
static attributes = {
...super.attributes,
value: {
value: 0n,
predicate: v => v >= -(1n << 63n) && v < 1n << 63n,
},
}
static {
this.cleanupAttributes(this.attributes)
}
constructor(value = 0) {
super(value)
/** @type {Number} */ this.value
}
valueOf() {
return this.value
}
toString() {
return this.value.toString()
}
}