// --- BOOL CASTING ---

func bool_to_int(value: Bool) -> Int {
    if value {
        return 1
    } else {
        return 0
    }
}

func bool_to_float(value: Bool) -> Float {
    if value {
        return 1.0
    } else {
        return 0.0
    }
}

// --- FLOAT CASTING ---

func float_to_int(value: Float) -> Int {
    return Builtin.ftoi(value)
}

// --- INT CASTING ---

func int_to_float(value: Int) -> Float {
    return Builtin.itof(value)
}
