You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make the 'Tangent Inverse' node accept DVec2 in lieu of the separate atan2 node (#2516)
* Make the Tangent Inverse node accept DVec2
If given a DVec2 it will be atan2 instead of normal atan.
* Remove the now-redundant atan2 node
* Doc comment
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
if radians { y.atan2(x)}else{ y.atan2(x).to_degrees()}
230
+
pubtraitTangentInverse{
231
+
typeOutput: num_traits::float::Float;
232
+
fnatan(self,radians:bool) -> Self::Output;
233
+
}
234
+
implTangentInverseforf32{
235
+
typeOutput = f32;
236
+
fnatan(self,radians:bool) -> Self::Output{
237
+
if radians {self.atan()}else{self.atan().to_degrees()}
238
+
}
239
+
}
240
+
implTangentInverseforf64{
241
+
typeOutput = f64;
242
+
fnatan(self,radians:bool) -> Self::Output{
243
+
if radians {self.atan()}else{self.atan().to_degrees()}
244
+
}
245
+
}
246
+
implTangentInversefor glam::DVec2{
247
+
typeOutput = f64;
248
+
fnatan(self,radians:bool) -> Self::Output{
249
+
if radians {self.y.atan2(self.x)}else{self.y.atan2(self.x).to_degrees()}
250
+
}
239
251
}
240
252
241
253
/// The random function (rand) converts a seed into a random number within the specified range, inclusive of the minimum and exclusive of the maximum. The minimum and maximum values are automatically swapped if they are reversed.
0 commit comments