Skip to content

Commit

Permalink
slight code tidup
Browse files Browse the repository at this point in the history
  • Loading branch information
georgejecook committed Oct 16, 2023
1 parent 5ca1506 commit 4ede3b0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/source/core/Utils.bs
Original file line number Diff line number Diff line change
Expand Up @@ -21,43 +21,43 @@ namespace mc
end function

function isArray(value as dynamic) as boolean
return type(value) <> "<uninitialized>" and value <> invalid and GetInterface(value, "ifArray") <> invalid
return type(value) <> "<uninitialized>" and value <> invalid and getInterface(value, "ifArray") <> invalid
end function

function isAACompatible(value as dynamic) as boolean
return type(value) <> "<uninitialized>" and value <> invalid and GetInterface(value, "ifAssociativeArray") <> invalid
return type(value) <> "<uninitialized>" and value <> invalid and getInterface(value, "ifAssociativeArray") <> invalid
end function

function isString(value as dynamic) as boolean
return type(value) <> "<uninitialized>" and GetInterface(value, "ifString") <> invalid
return type(value) <> "<uninitialized>" and getInterface(value, "ifString") <> invalid
end function

function isBoolean(value as dynamic) as boolean
return type(value) <> "<uninitialized>" and GetInterface(value, "ifBoolean") <> invalid
return type(value) <> "<uninitialized>" and getInterface(value, "ifBoolean") <> invalid
end function

function isFunction(value as dynamic) as boolean
return type(value) = "Function" or type(value) = "roFunction"
end function

function isInteger(value as dynamic) as boolean
return type(value) <> "<uninitialized>" and GetInterface(value, "ifInt") <> invalid
return type(value) <> "<uninitialized>" and getInterface(value, "ifInt") <> invalid
end function

function isDouble(value as dynamic) as boolean
return type(value) <> "<uninitialized>" and GetInterface(value, "ifDouble") <> invalid
return type(value) <> "<uninitialized>" and getInterface(value, "ifDouble") <> invalid
end function

function isNumber(value as dynamic) as boolean
return type(value) <> "<uninitialized>" and (GetInterface(value, "ifFloat") <> invalid or GetInterface(value, "ifInt") <> invalid or GetInterface(value, "ifDouble") <> invalid)
return type(value) <> "<uninitialized>" and (getInterface(value, "ifFloat") <> invalid or getInterface(value, "ifInt") <> invalid or getInterface(value, "ifDouble") <> invalid)
end function

function isFloat(value as dynamic) as boolean
return type(value) <> "<uninitialized>" and GetInterface(value, "ifFloat") <> invalid
return type(value) <> "<uninitialized>" and getInterface(value, "ifFloat") <> invalid
end function

function isLong(value as dynamic) as boolean
return type(value) <> "<uninitialized>" and (GetInterface(value, "ifLongInt") <> invalid or GetInterface(value, "ifDouble") or GetInterface(value, "ifDouble") <> invalid or GetInterface(value, "ifInt") <> invalid)
return type(value) <> "<uninitialized>" and (getInterface(value, "ifLongInt") <> invalid or getInterface(value, "ifDouble") or getInterface(value, "ifDouble") <> invalid or getInterface(value, "ifInt") <> invalid)
end function

function isPoint(value as dynamic) as boolean
Expand Down

0 comments on commit 4ede3b0

Please sign in to comment.