diff options
| author | gingerBill <bill@gingerbill.org> | 2022-07-24 22:46:07 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-07-24 22:46:07 +0100 |
| commit | 2bdbce55f9d7b2b17322bf3879df446e77da70a6 (patch) | |
| tree | 75e3e8f77a7b32f65af13db05fa89524ed1f3d79 | |
| parent | 9614ca92f0a141d972b654c94b7dc6ae37c4e3b1 (diff) | |
| parent | d30e59f539e651af079668b15b2f20349cad21f1 (diff) | |
Merge branch 'master' of https://github.com/odin-lang/Odin
| -rw-r--r-- | .github/workflows/ci.yml | 2 | ||||
| -rwxr-xr-x | build_odin.sh | 2 | ||||
| -rw-r--r-- | core/math/linalg/specific.odin | 6 | ||||
| -rw-r--r-- | src/gb/gb.h | 4 |
4 files changed, 9 insertions, 5 deletions
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: 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) 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 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 <sys/wait.h> +#endif + #if defined(_MSC_VER) #define GB_COMPILER_MSVC 1 #elif defined(__GNUC__) |