{"id":18234199,"url":"https://github.com/dmrokan/gdblas","last_synced_at":"2026-01-18T07:14:52.115Z","repository":{"id":231796906,"uuid":"781551507","full_name":"dmrokan/gdblas","owner":"dmrokan","description":"A plugin which adds several mathetmatical routines to Godot game engine based on Eigen and Boost.","archived":false,"fork":false,"pushed_at":"2024-08-15T16:39:34.000Z","size":4763,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-04T20:02:51.710Z","etag":null,"topics":["algebra","boost","eigen","geometry","godot","math","odeint","plugin"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmrokan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-03T15:42:47.000Z","updated_at":"2024-11-03T14:41:43.000Z","dependencies_parsed_at":"2024-05-23T01:34:15.096Z","dependency_job_id":"2311bcc7-47f8-40d6-9656-4f09042a5cc7","html_url":"https://github.com/dmrokan/gdblas","commit_stats":null,"previous_names":["dmrokan/gdblas"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrokan%2Fgdblas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrokan%2Fgdblas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrokan%2Fgdblas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmrokan%2Fgdblas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmrokan","download_url":"https://codeload.github.com/dmrokan/gdblas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247097651,"owners_count":20883122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algebra","boost","eigen","geometry","godot","math","odeint","plugin"],"created_at":"2024-11-04T20:01:40.065Z","updated_at":"2026-01-18T07:14:52.089Z","avatar_url":"https://github.com/dmrokan.png","language":"C++","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# GDBlas\nThis native [Godot](https://github.com/godotengine/godot) extension provides real and complex matrix algebra. It uses data structures and matrix iterators of [Eigen](https://gitlab.com/libeigen/eigen) library, also includes ODE solver based on [ODEINT](https://github.com/headmyshoulder/odeint-v2).\n\nIn version `1.4.0`, [BoostC++ Geometry](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/index.html) algorithms are added.\n\n## Demos\n1. There is a demo project in `demo` directory which includes numerous tests and displacement simulation of a flexible structure. Its mathematical model can be found in my [PhD thesis](https://www.proquest.com/openview/28b57f84e375831a4f1ae27be456ba2d/1?pq-origsite=gscholar\u0026cbl=2026366\u0026diss=y) (Chapter 6).\n2. 3D demo project based on a [Godot example](https://github.com/godotengine/godot-demo-projects/releases/download/4.2-31d1c0c/3d_occlusion_culling_mesh_lod.zip). It displays filtered versions of the texture in `Viewport` as shown below.\n\n![Demo3D screenshot](docs/demo3d_screenshot.jpg?raw=true)\n\nhttps://gist.github.com/user-attachments/assets/aa9c1056-6da8-4c55-9c86-5937d3cd315c\n\n**An example**:\n```gdscript\nvar gbl = GDBlas.new()\nvar A = gbl.new_mat(3, 2)\nvar b = gbl.new_mat(2, 1)\nA.from_array([ [1, 2], [3, 4], [5, 6] ])\nb.from_array([ [1], [-1] ])\nvar c = A.prod(b)\nprint(c.to_array())\nc.abs()\nprint(c.to_array())\nc.log()\nprint(c.to_array())\nc.add(3)\nprint(c.to_array())\n```\nwill print out\n```\n\u003e\u003e\u003e [ [-1], [-1], [-1] ]\n\u003e\u003e\u003e [ [1], [1], [1] ]\n\u003e\u003e\u003e [ [0], [0], [0] ]\n\u003e\u003e\u003e [ [3], [3], [3] ]\n```\n\n# Classes\n## GDBlas\nReference counted base class which is used to create new matrices\n\n### Methods\n- `new_mat(p_rows, p_cols = -1)`: Creates new real matrix, Usage:\n```gdscript\nvar gbl = GDBlas.new()\nvar A = gbl.new_mat(3, 12) # Creates a 3 by 12 real matrix\nvar B = gbl.new_mat(3) # Creates a 3 by 3 real matrix\nvar C = gbl.new_mat(Vector2i(4, 2)) # Creates a 4 by 2 real matrix\n```\n- `new_complex_mat(p_rows, p_cols = -1)`: Creates new complex matrix\n- `linspace(p_start, p_end, p_count)`: Creates a column vector of linearly spaced values\n```gdscript\nvar gbl = GDBlas.new()\nvar A = gbl.linspace(0, 1, 3) # Creates a 3 by 1 matrix with entries [ [0], [0.5], [1] ]\n```\n- `mat_to_image_data(p_mat_array: Array, p_channel_width: int = 1)`: Places the entries of `GDBlasMat` objects in `p_mat_array` into a `PackedByteArray` which matches the data structure returned from `Image::get_data()`.\n```gdscript\nvar gbl = GDBlas.new()\nvar dim = Vector2i(480, 640)\nvar R = gbl.new_mat(dim)\nvar G = gbl.new_mat(dim)\nvar B = gbl.new_mat(dim)\n\n# fill and process R, G, B matrices\n\nvar pack: PackedByteArray = gbl.mat_to_image_data([ R, G, B ])\n# An RGB8 formatted Image object can be created by using the data in 'pack'\n```\n\n### Boost Geometry\n\n#### Data structures\n\nList of Boost Geometry [data structures](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/models.html) and their representations in GDScript to be used by `GDBlas`'s bindings of Boost Geometry [algorithms](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms.html).\n\n- `model::point` \u0026equiv; `Vector2`\n- `model::linestring` \u0026equiv; `PackedVector2Array`\n- `model::ring` \u0026equiv; `PackedVector2Array` if the first and last values of the array are equal.\n- `model::polygon` \u0026equiv; `Array` of `PackedVector2Array` where the first entry represents the outer ring and the other entries represent inner rings. Inner rings are optional.\n  - `ring_type model::polygon::outer` \u0026equiv; `PackedVector2Array` where the first and last values of the array are equal.\n  - `ring_type model::polygon::inners[i]` \u0026equiv; `PackedVector2Array` where the first and last values of the array are equal.\n- `model::box` \u0026equiv; `Rect2`\n\n#### Algorithms\n\n- [`area`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/area.html)\n- [`buffer`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/buffer.html)\n- [`centroid`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/centroid.html)\n- [`clear`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/clear.html)\n- [`closest_points`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/closest_points.html)\n- [`convert`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/convert.html)\n- [`convex_hull`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/convex_hull.html)\n- [`correct`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/correct.html)\n- [`covered_by`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/covered_by.html)\n- [`crosses`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/crosses.html)\n- [`densify`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/densify.html)\n- [`difference`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/difference.html)\n- [`discrete_frechet_distance`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/discrete_frechet_distance.html)\n- [`discrete_hausdorff_distance`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/discrete_hausdorff_distance.html)\n- [`disjoint`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/disjoint.html)\n- [`distance`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/distance.html)\n- [`envelope`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/envelope.html)\n- [`equals`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/equals.html)\n- [`intersection`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/intersection.html)\n- [`intersects`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/intersects.html)\n- [`is_empty`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/is_empty.html)\n- [`is_simple`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/is_simple.html)\n- [`is_valid`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/is_valid.html)\n- [`length`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/length.html)\n- [`overlaps`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/overlaps.html)\n- [`perimeter`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/perimeter.html)\n- [`relation`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/relation.html)\n- [`reverse`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/reverse.html)\n- [`simplify`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/simplify.html)\n- [`sym_difference`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/sym_difference.html)\n- [`touches`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/touches.html)\n- [`transform`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/transform.html)\n- [`union_`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/union_.html)\n- [`unique`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/unique.html)\n- [`within`](https://www.boost.org/doc/libs/1_85_0/libs/geometry/doc/html/geometry/reference/algorithms/within.html)\n\n#### Return types and errors\n\nThe algorithms above may not be used all combinations of `model`s. In such cases and error message is emitted and function returns an invalid value. The map of return types and invalid values are given below.\n\n- `bool` return types: Returns `int`. `1` = `true`, `0` = `false`, negative value on error.\n- `int` return types: Returns `int`, negative value on error.\n- `double` return types: Returns `float`, `NaN` on error.\n- `model::polygon` return types: Returns `Array` of `PackedVector2Array`, empty `Array` on error.\n- `model::ring` return types: Returns `PackedVector2Array`, empty `PackedVector2Array` on error.\n- `model::line` return types: Returns `PackedVector2Array`, empty `PackedVector2Array` on error.\n- `model::point` return types: Returns `Vector2`, `Vector2(NaN, NaN)` on error.\n- `model::box` return types: Returns `Rect2`, `Rect2(NaN, NaN, NaN, NaN)` on error.\n\n#### Examples\n\nYou can check the tests in [demo/GDBlasTest.gd](./demo/GDBlasTest.gd) for learning how to use.\n\n## GDBlasMat\nReference counted real or complex matrix object. A real matrix returns enries as a `float` and complex matrix as `Vector2`.\n\n### Methods\n- `resize(m: Variant, n: int = -1)`: Resizes matrix to m by n if both are integer. `n` is not required if `m` is `Vector2i`.\n- `copy()`: Creates a copy of matrix.\n```gdscript\nvar gbl = GDBlas.new()\nvar A = gbl.new_mat(3)\nvar B = A.copy()\n```\n- `dimension()`: Returns the size of matrix as a `Vector2i` object\n- `get(i, j, m = -1, n = -1)`: Get a matrix entry or a submatrix of size m by n starting ith row and jth column. Returns `0` on success or error value.\n```gdscript\nvar gbl = GDBlas.new()\nvar A = gbl.new_mat(3)\nvar a00: float = A.get(0, 0)\nvar Asub: GDBlasMat = A.get(1, 0, 2, 2) # Returns 2 by 2 sub matrix\nvar Ac = gbl.new_complex_mat(3)\nvar ac00: Vector2 = A.get(0, 0)\n```\n- `set(val, i = -1, j = -1)`: Set a matrix entry or a submatrix of size m by n starting ith row and jth column. Returns `0` on success or error value.\n```gdscript\nvar gbl = GDBlas.new()\nvar A = gbl.new_mat(3)\nvar a00: float = A.set(1, 0, 0)\nvar Asub = gbl.new_mat(2)\nA.set(Asub, 1, 0)\n```\n- `add(val)`: Adds a number or a matrix of same dimension. Returns `0` on success or error value.\n```gdscript\nvar gbl = GDBlas.new()\nvar A = gbl.new_mat(3)\nA.add(1)\nvar B = A.copy()\nB.add(A)\n```\n- `mul(val)`: Multiplies by a number or a matrix of same dimension. Returns `0` on success or error value.\n- `div(val)`: Divides by a number or a matrix of same dimension. Returns `0` on success or error value.\n**NOTE**: Can not add complex matrices to a real matrix\n- `sub(val)`: Subtracts a number or a matrix of same dimension. Returns `0` on success or error value.\n- `transpose()`: Transposes the matrix.  Returns `0` on success or error value.\n- `hermitian()`: Hermitian transpose of matrix. Returns `0` on success or error value.\n- `is_eq(other, p_eps, p_norm_type)`: Checks if matrices are equal, meaning that norm of their differences are less than `p_eps` . Returns `true` or `false`\n```gdscript\nvar gbl = GDBlas.new()\nvar A = gbl.new_mat(3)\nvar B = A.copy()\nif A.is_eq(B):\n    print(\"They are equal\")\n```\n- `fill(val)`: Sets all matrix entries to `val`. `val` can be a number or `Vector2` if it is a complex matrix. Returns `0` on success.\n- `eye(val)`: Sets all diagonal matrix entries to `val`. `val` can be a number or `Vector2` if it is a complex matrix. Returns `0` on success.\n- `reset()`: Sets all entries to `0`.\n- `conj()`: Conjugates all matrix entries. Returns `0` on success.\n- `real(matrix)`: Returns or sets the real part of complex matrix. It is equivalent to `set(matrix, 0, 0)` on real case.\n- `imag(matrix)`: Returns or sets the imaginary part of complex matrix. It returns a matrix of zeros for real matrix case.\n- `prod(matrix)`: Returns product of matrices.\n```gdscript\nvar gbl = GDBlas.new()\nvar A = gbl.new_mat(3)\nvar B = gbl.new_mat(3, 5)\nvar C = A.prod(B)\n```\nIt is equivalent to `C=AB`, column count of `A` and row count of `B` must be equal.\n- `inv()`: Computes the inverse of matrix. It can only be applied to square matrices. It will return the inverse matrix or `null` if matrix is singular.\n- `from_array(arr)`: Sets matrix entries according to the values on 2 dimensional array `arr`. Return `0` on success.\n```gdscript\nvar gbl = GDBlas.new()\nvar A = gbl.new_mat(3, 2)\nA.from_array([ [1, 2], [3, 4], [5, 6] ])\n```\n- `to_array()`: Returns a 2 dimensional array filled with matrix entries.\n```gdscript\nvar gbl = GDBlas.new()\nvar A = gbl.new_complex_mat(2, 2)\nA.eye(Vector2(1, -1))\nprint(A.to_array())\n```\nwill print\n```\n\u003e\u003e\u003e [ [(1,-1), (0,0)], [(0,0), (1,-1)] ]\n```\n- `integrate(axis = -1)`: Calculates sum of matrix entries on given axis. `axis=0`: sums over rows, `axis=1`: sums of cols, `axis=-1`: (default) sum of all entries. Returns a `GDBlasMat` object containing the sum of values.\n- `mean(axis = -1)`: Calculates mean of matrix entries on given axis. `axis=0`: mean over rows, `axis=1`: mean of cols, `axis=-1`: (default) mean of all entries. Returns a `GDBlasMat` object containing the means.\n- `min(axis = -1)`: Finds the minimum of matrix entries on given axis. `axis=0`: min over rows, `axis=1`: min of cols, `axis=-1`: (default) min of all entries. Returns a `GDBlasMat` object containing the minimums.\n- `max(axis = -1)`: Finds the maximum of matrix entries on given axis. `axis=0`: max over rows, `axis=1`: max of cols, `axis=-1`: (default) max of all entries. Returns a `GDBlasMat` object containing the maximums.\n- `argmin(axis = -1)`: Finds the index of minimum of matrix entries on given axis. `axis=0`: min over rows, `axis=1`: min of cols, `axis=-1`: (default) min of all entries. Returns an `Array` of `Vector2i` containing the indices of minimums.\n- `argmax(axis = -1)`: Finds the index of maximum of matrix entries on given axis. `axis=0`: max over rows, `axis=1`: max of cols, `axis=-1`: (default) max of all entries. Returns an `Array` of `Vector2i` containing the indices of minimums.\n- `norm(norm_type)`: Computes $L1$, $L_{\\infty}$ or Frobenius norm of matrix. Accepted arguments are `GDBlas.NORM_1`, `GDBlas.NORM_INF` or `GDBlas.NORM_FRO`. Returns `float`.\n- `eval_ode(p_f: Callable, p_dt: float, p_max_step: float = 1e-2)`: Evaluates the ordinary differential equation (ODE) defined in `p_f` for an amount of time given by `p_dt` starting from the current value of matrix. It can be called on only real n by 1 matrices (equivalent to a column vector). Returns the step count (how many times the ODE function is evaluated) or a negative value on error.\n```gdscript\nvar A: GDBlasMat = null\nfunc ode_fx(x: GDBlasMat, t: float):\n\treturn A.prod(x)\n\nfunc some_func():\n\tvar gbl = GDBlas.new()\n\tA = gbl.new_mat(2)\n\tA.eye(-1)\n\tvar x = gbl.new_mat(2, 1)\n\tx.fill(1)\n\n\tx.eval_ode(ode_fx, 0.5, 1e-3) # Writes final value at t = 0.5 into x itself\n```\n- `conv(p_other: GDBlasMat, p_same: bool = false)`: Computes convolution of matrices. If `p_same` is `true`, returns the central part of the result.\n```gdscript\nvar gbl = GDBlas.new()\nA = gbl.new_mat(m1, n1)\nA.from_array( ... ) # Fill with values.\nB = gbl.new_mat(m2, n2)\nB.from_array( ... ) # Fill with values.\nvar C = A.conv(B)\nassert(C.dimension() == Vector2i(m1 + m2 - 1, n1 + n2 -1))\nvar D = B.conv(A, 'same')\nassert(D.dimension() == Vector2i(m2, n2))\n```\n- `pack(p_component: int = GDBlas.BOTH_COMPONENTS)`: Packs matrix entries into a `PackedFloat64Array` in row major format. Argument `p_component` can take values `GDBlas.REAL_COMPONENT`, `GDBlas.IMAG_COMPONENT` or `GDBlas.BOTH_COMPONENTS`. If both components of a complex matrix is packed imaginary part of each entry is placed right after the real component in the `PackedFloat64Array`. Returns `PackedFloat64Array`.\n- `unpack(p_packed_data: PackedFloat64Array, p_component: int = GDBlas.BOTH_COMPONENTS, p_step: int = 1, p_offset: int = 0)`: Unpacks the data in `p_packed_data` into the matrix. If `p_step = n`, each nth entry in the `p_packed_data` placed into the matrix starting from the entry indexed by `p_offset`. Number of elements in the array divided by `p_step` must match the matrix dimension.\n- `downsample(p_factor_m: int, p_factor_n: int, p_filter: GDBlasMat = null)`: Returns a new matrix constructed by picking rows and columns whose index satisfy `row_index % p_factor_m == 0` and `col_index % p_factor_n == 0`. If `p_filter` provided, the matrix is filtered (by convolving) by the the coefficients of `p_filter` before down sampling.\n\n### Elementwise functions\nA list of implemented math functions are given below. They operate elementwise on the matrix and modifies matrix itself instead of creating a copy. You can visit C++ stdlib documentation for mathematical meaning of these functions.\n\n- `f(p_func: Callable, p_args: Array = null, p_indexed: bool = false)`: Applies `p_func` on each matrix entry and writes the result in place. If `p_indexed` is `true`, `p_func` can have additional argumens which gives the row and column number of the matrix entry.\n```gdscript\nfunc add_1(a):\n\treturn a + 1\n\nfunc add_const(a, args: Array):\n\treturn a + args[0]\n\nfunc add_const_2(a, args: Array, i: int, j: int):\n\tif i \u003c 1 and j \u003c 1:\n\t\treturn a + args[0]\n\telse:\n\t\treturn a\n\nfunc some_func():\n\tvar gbl = GDBlas.new()\n\tvar A = gbl.new_mat(2, 2)\n\tA.f(add_1)\n\tA.f(add_const, [ 3 ])\n\tA.f(add_const_2, [ 3 ], true)\n```\n**NOTE**: If the matrix is complex, first argument of callable is a `Vector2` and its return type must also be `Vector2`.\n\n- `sin()`\n\n```gdscript\nvar gbl = GDBlas.new()\nvar vec = gbl.linspace(-0.5, 0.5, 256)\nvec.mul(2 * PI)\nvec.sin() # Calculate sine of vec and write in place.\n```\n\n- `cos()`\n- `abs()`\n- `exp()`\n- `log()`\n- `log10()`\n- `log2()`\n- `sqrt()`\n- `cbrt()`\n- `tan()`\n- `asin()`\n- `acos()`\n- `atan()`\n- `sinh()`\n- `cosh()`\n- `tanh()`\n- `atanh()`\n- `erf()`\n- `erfc()`\n- `tgamma()`\n- `lgamma()`\n- `ceil()`\n- `floor()`\n- `trunc()`\n- `round()`\n\n## Build from source\n```sh\ngit clone https://github.com/dmrokan/gdblas.git\ncd gdblas\ngit submodule update --init --recursive\n```\n**Build boost**\n```sh\ncd boost\n./bootstrap.sh\n./b2 headers\n```\nYou can visit [Boost wiki](https://github.com/boostorg/wiki/wiki) for more information.\n\n**Build extension**\n\nGodot Engine does not use C++ exception handling. It provides `-fno-exceptions` flag to the compiler. However, Boost C++ utilizes `try, catch, throw` statements in many parts of its code base which can be disabled by defining `BOOST_NO_EXCEPTIONS` preprocessor expression. It seems that some parts of `boost::geometry` ignores this preprocessor definition and still adds exception handling related expressions to the compilation units which causes compilation errors. Repo has a patch to modify related lines in Boost library code and it should be applied before compiling the `GDBlas` library.\n\nStart by applying the patch.\n```sh\ncd boost\npatch -s -p0 \u003c ../boost_noexception.patch\n```\nThen,\n```sh\nTARGET=template_debug # or template_release\nPLATFORM=linux # or windows, macos\nARCH=x86_64 # for other options check Godot docs\ncd godot-cpp\nscons target=\"$TARGET\" platform=\"$PLATFORM\" arch=\"$ARCH\"\ncd ..\nscons target=\"$TARGET\" platform=\"$PLATFORM\" arch=\"$ARCH\"\n```\nBuild by disabling Boost C++ based functionality to reduce binary size\n```sh\nscons target=\"$TARGET\" platform=\"$PLATFORM\" arch=\"$ARCH\" DISABLE_GDBLAS_ODE=1 DISABLE_GDBLAS_GEOMETRY=1\n```\nYou can visit Godot's [build system](https://docs.godotengine.org/en/stable/contributing/development/compiling/introduction_to_the_buildsystem.html) documentation for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmrokan%2Fgdblas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmrokan%2Fgdblas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmrokan%2Fgdblas/lists"}