Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bolt integer coming back wrong? #164

Open
Alfiec7113 opened this issue Jan 24, 2024 · 2 comments
Open

Bolt integer coming back wrong? #164

Alfiec7113 opened this issue Jan 24, 2024 · 2 comments

Comments

@Alfiec7113
Copy link

image image

Seems to be something wrong with negative numbers?
Is there something I need to configure for that.

let mut tile_result = driver
    .execute(
        query(
        "   MATCH (p:Player {username: 'c'})-[:EXPLORED]->(t:Tile)
            OPTIONAL MATCH (p)-[:UNIT]->(u:Unit)-[:FOV]->(t)
            OPTIONAL MATCH (u)-[:Position]->(pt:Tile)
            
            RETURN 
                COLLECT(DISTINCT apoc.map.merge({node_id: elementId(u), tile_node_id: elementId(pt)}, properties(u))) AS units, 
                COLLECT(DISTINCT apoc.map.merge({id: elementId(t), fov:u is not null}, properties(t))) AS tiles       
        ",
        )
        .param("username", username),
    )
    .await?;

let row = tile_result
    .next()
    .await?
    .expect("No row returned for tile query");
println!("{:#?}", row);
@Alfiec7113
Copy link
Author

image image

It's like it's subtracting from 256 if its minus but if its below -256 it must just display the correct number

@Alfiec7113
Copy link
Author

-10.0 works so floats arent broken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant