From 89222a0ab22bbe8067111405caf4f2b703f44732 Mon Sep 17 00:00:00 2001 From: Ronald1985 Date: Tue, 14 Jun 2022 09:55:06 +0100 Subject: [PATCH 1/5] Added missing #includes on OpenBSD --- src/common.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common.cpp b/src/common.cpp index 77caddfe8..2f7ab7916 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -25,6 +25,11 @@ #include #endif +#if defined(GB_SYSTEM_OPENBSD) +#include +#include +#endif + #include #include #include // Because I wanted the C++11 memory order semantics, of which gb.h does not offer (because it was a C89 library) From 00e704b216e1f20a0d6eb7a005a76a01d208caa2 Mon Sep 17 00:00:00 2001 From: Luxko Date: Sat, 23 Jul 2022 00:59:45 +0800 Subject: [PATCH 2/5] fix `linalg.angle_from_quaternion` fixes #1894 .2: ```odin package laa import "core:fmt" import la "core:math/linalg" main:: proc() { angle := f32(0.5) quat := la.quaternion_angle_axis_f32(angle,la.Vector3f32{0,0,1}) fmt.printf("retreived: %0.8f\n", la.angle_from_quaternion(quat)) // should be 0.5, but wasn't } ``` --- core/math/linalg/specific.odin | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/math/linalg/specific.odin b/core/math/linalg/specific.odin index a4aaeb012..c4ecb194f 100644 --- a/core/math/linalg/specific.odin +++ b/core/math/linalg/specific.odin @@ -476,21 +476,21 @@ quaternion_angle_axis :: proc{ angle_from_quaternion_f16 :: proc(q: Quaternionf16) -> f16 { if abs(q.w) > math.SQRT_THREE*0.5 { - return math.asin(q.x*q.x + q.y*q.y + q.z*q.z) * 2 + return math.asin(math.sqrt(q.x*q.x + q.y*q.y + q.z*q.z)) * 2 } return math.acos(q.w) * 2 } angle_from_quaternion_f32 :: proc(q: Quaternionf32) -> f32 { if abs(q.w) > math.SQRT_THREE*0.5 { - return math.asin(q.x*q.x + q.y*q.y + q.z*q.z) * 2 + return math.asin(math.sqrt(q.x*q.x + q.y*q.y + q.z*q.z)) * 2 } return math.acos(q.w) * 2 } angle_from_quaternion_f64 :: proc(q: Quaternionf64) -> f64 { if abs(q.w) > math.SQRT_THREE*0.5 { - return math.asin(q.x*q.x + q.y*q.y + q.z*q.z) * 2 + return math.asin(math.sqrt(q.x*q.x + q.y*q.y + q.z*q.z)) * 2 } return math.acos(q.w) * 2 From 4cb4173ced6c640d9d23af142582c3d8dffa3dd5 Mon Sep 17 00:00:00 2001 From: Ronald1985 Date: Thu, 16 Jun 2022 08:55:02 +0100 Subject: [PATCH 3/5] Updated shabang in build_odin.sh so it runs on OpenBSD This change doesn't break compatibility on Linux or Darwin --- build_odin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_odin.sh b/build_odin.sh index aef3f2836..b00d33323 100755 --- a/build_odin.sh +++ b/build_odin.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu GIT_SHA=$(git rev-parse --short HEAD) From 1829aa1638362159fc54ea031a6aec760d0ff9ee Mon Sep 17 00:00:00 2001 From: Ronald1985 Date: Fri, 22 Jul 2022 23:08:46 +0100 Subject: [PATCH 4/5] Undo changes to common.cpp and move the include of sys/wait.h to gb.h --- src/common.cpp | 5 ----- src/gb/gb.h | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/common.cpp b/src/common.cpp index 2f7ab7916..77caddfe8 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -25,11 +25,6 @@ #include #endif -#if defined(GB_SYSTEM_OPENBSD) -#include -#include -#endif - #include #include #include // Because I wanted the C++11 memory order semantics, of which gb.h does not offer (because it was a C89 library) diff --git a/src/gb/gb.h b/src/gb/gb.h index 48d3c9aec..d09c7618b 100644 --- a/src/gb/gb.h +++ b/src/gb/gb.h @@ -90,6 +90,10 @@ extern "C" { #error This operating system is not supported #endif +#if defined(GB_SYSTEM_OPENBSD) +#include +#endif + #if defined(_MSC_VER) #define GB_COMPILER_MSVC 1 #elif defined(__GNUC__) From a3afe617c218736563723fd1ab343f403bdd33f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikkel=20Hjortsh=C3=B8j?= Date: Sun, 24 Jul 2022 23:27:07 +0200 Subject: [PATCH 5/5] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d72775636..e6341671a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ name: CI -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] jobs: build_linux: