dbat :godot: on Nostr: #Gdscript #GodotEngine Is there a better way to write this kind of thing? ``` if ...
#Gdscript #GodotEngine
Is there a better way to write this kind of thing?
```
if is_zero_approx(vec.x): vec.x=0
if is_zero_approx(vec.y): vec.y=0
if is_zero_approx(vec.z): vec.z=0
```
🦇
Published at
2024-12-18 17:13:31 UTCEvent JSON
{
"id": "89f5a813d5ef2cda64028711a9f0e3710422fb038ff9f037b8d91024d875dc25",
"pubkey": "fefd355a3f919975922a2de556923e55039735ca7e4c8885043c73c53e0e82ef",
"created_at": 1734542011,
"kind": 1,
"tags": [
[
"t",
"godotengine"
],
[
"proxy",
"https://mastodon.gamedev.place/@dbat/113674945280550485",
"web"
],
[
"t",
"gdscript"
],
[
"proxy",
"https://mastodon.gamedev.place/users/dbat/statuses/113674945280550485",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.gamedev.place/users/dbat/statuses/113674945280550485",
"pink.momostr"
],
[
"-"
]
],
"content": "#Gdscript #GodotEngine \n\nIs there a better way to write this kind of thing?\n\n```\nif is_zero_approx(vec.x): vec.x=0\nif is_zero_approx(vec.y): vec.y=0\nif is_zero_approx(vec.z): vec.z=0\n```\n\n🦇",
"sig": "467d9169c38c80c56a899099fd531d5d256a46e1596fe2a0fbf1be45af6e0eabe53b7a7f604d2aaac7b2ffc0ab7bbbfb40eccef11e68127b6802f3e61bc6aebe"
}