creating Vectors with NaN values replaces most of them with 0
See original GitHub issueSetting any THREE.Vectorx with NaN values causes the NaN value to be replaced by 0,
except for the w field of a Vector4.
eg
new Vector3(NaN, 3, 4)
returns Vector3(0, 3, 4)
new Vector4(NaN, NaN, NaN, NaN)
returns Vector4(0, 0, 0, NaN)
I can see fixing this would add a fraction to the common code path, but it causes some very unexpected failure to propagate NaN values.
Three.js version
- Dev
- [x ] r117
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Hardware Requirements (graphics card, VR Device, …)
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Replacing unassigned values in a vector with nans instead of ...
Replacing unassigned values in a vector with nans instead of zeros ... around them - then unassigned values in the vector automatically equal...
Read more >R Replace NA with 0 (10 Examples for Data Frame, Vector ...
A common way to treat missing values in R is to replace NA with 0. You will find a summary of the ......
Read more >Replace NaN Values with Zeros in Pandas DataFrame
NaN stands for Not A Number and is one of the common ways to represent the missing value in the data. It is...
Read more >Replace NaN values in a list with zero (0) - Stack Overflow
I forced z to data frame but it wasn't enough, maybe there is a form to change NaN in list. Thanks for your...
Read more >How to Replace NaN Values with Zero in NumPy - Statology
The following code shows how to replace all NaN values with zero in a NumPy array: import numpy as np #create array of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
three.js does not support
NaNs
. I do not think three.js should be responsible for converting them to zeros or ones.NaNs
should be handled at the app level, IMO – and not passed into constructors.This made my blood boil for so many reasons…