mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
cb241a7326
commit
3c71eba446
10
internal/shader/testdata/atan.expected.metal
vendored
Normal file
10
internal/shader/testdata/atan.expected.metal
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
void F0(float l0, float l1, thread bool& l2);
|
||||
|
||||
void F0(float l0, float l1, thread bool& l2) {
|
||||
float l3 = float(0);
|
||||
float l4 = float(0);
|
||||
l3 = atan((l1) / (l0));
|
||||
l4 = atan2(l1, l0);
|
||||
l2 = (l3) == (l4);
|
||||
return;
|
||||
}
|
10
internal/shader/testdata/atan.expected.vs
vendored
Normal file
10
internal/shader/testdata/atan.expected.vs
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
void F0(in float l0, in float l1, out bool l2);
|
||||
|
||||
void F0(in float l0, in float l1, out bool l2) {
|
||||
float l3 = float(0);
|
||||
float l4 = float(0);
|
||||
l3 = atan((l1) / (l0));
|
||||
l4 = atan(l1, l0);
|
||||
l2 = (l3) == (l4);
|
||||
return;
|
||||
}
|
7
internal/shader/testdata/atan.go
vendored
Normal file
7
internal/shader/testdata/atan.go
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
func Foo(x, y float) bool {
|
||||
a := atan(y / x)
|
||||
b := atan2(y, x)
|
||||
return a == b
|
||||
}
|
@ -65,6 +65,8 @@ func basicTypeString(t shaderir.BasicType) string {
|
||||
|
||||
func builtinFuncString(f shaderir.BuiltinFunc) string {
|
||||
switch f {
|
||||
case shaderir.Atan2:
|
||||
return "atan"
|
||||
case shaderir.Dfdx:
|
||||
return "dFdx"
|
||||
case shaderir.Dfdy:
|
||||
|
@ -220,6 +220,7 @@ const (
|
||||
Asin BuiltinFunc = "asin"
|
||||
Acos BuiltinFunc = "acos"
|
||||
Atan BuiltinFunc = "atan"
|
||||
Atan2 BuiltinFunc = "atan2"
|
||||
Pow BuiltinFunc = "pow"
|
||||
Exp BuiltinFunc = "exp"
|
||||
Log BuiltinFunc = "log"
|
||||
@ -271,6 +272,7 @@ func ParseBuiltinFunc(str string) (BuiltinFunc, bool) {
|
||||
Asin,
|
||||
Acos,
|
||||
Atan,
|
||||
Atan2,
|
||||
Pow,
|
||||
Exp,
|
||||
Log,
|
||||
|
Loading…
Reference in New Issue
Block a user