🎨
Xylo Docs
  • Introduction
  • Getting Started
    • Quickstart
  • Guides
    • Random Rotations
  • Syntax
    • Primitives
    • Functions
  • Control Flow
  • Builtin Functions
    • System
    • Math
    • Comparison
    • List
    • Randomness
    • Shape
    • Color
Powered by GitBook
On this page
  • Logical Operators
  • Relational Operators
Export as PDF
  1. Builtin Functions

Comparison

Logical Operators

not x

Returns the opposite of n. Accepts only boolean types.

Equivalent to the (!) unary operator.

Example:

false_ = not true
false_ = (!) true
false_ = !true

and x y

Returns true if x and y are both true, false otherwise. Accepts only boolean types.

Equivalent to the (&&) binary operator.

Example:

false_ = and true false
false_ = (&&) true false
false_ = true && false

or x y

Returns true if either x or y are true, false otherwise. Accepts only boolean types.

Equivalent to the (||) binary operator.

Example:

true_ = or true false
true_ = (||) true false
true_ = true || false

Relational Operators

eq x y

Returns true if x equals y, false otherwise. Accepts only boolean types.

Equivalent to the (==) binary operator.

Example:

true_ = eq 3 3
true_ = (==) 3 3
true_ = 3 == 3

neq x y

Returns true if x does not equal y, false otherwise. Accepts only boolean types.

Equivalent to the (!=) binary operator.

Example:

true_ = neq 3 5
true_ = (!=) 3 5
true_ = 3 != 5

lt x y

Returns true if x is less than y, false otherwise. Accepts only boolean types.

Equivalent to the (<) binary operator.

Example:

true_ = lt 3 5
true_ = (<) 3 5
true_ = 3 < 5

gt x y

Returns true if x is greater than y, false otherwise. Accepts only boolean types.

Equivalent to the (>) binary operator.

Example:

false_ = gt 3 5
false_ = (>) 3 5
false_ = 3 > 5

lte x y

Returns true if x is less than or equal to y, false otherwise. Accepts only boolean types.

Equivalent to the (<=) binary operator.

Example:

true_ = lte 3 3
true_ = (<=) 3 3
true_ = 3 <= 3

gte x y

Returns true if x is greater than or equal to y, false otherwise. Accepts only boolean types.

Equivalent to the (>=) binary operator.

Example:

true_ = gte 5 3
true_ = (>=) 5 3
true_ = 5 >= 3
PreviousMathNextList

Last updated 5 days ago