zemu 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/zemu/config.rb +312 -0
- data/lib/zemu/instance.rb +179 -0
- data/lib/zemu.rb +172 -0
- data/src/debug.c +118 -0
- data/src/debug.h +30 -0
- data/src/external/Z/API/Z/ABIs/generic/allocator.h +36 -0
- data/src/external/Z/API/Z/ABIs/generic/cipher.h +47 -0
- data/src/external/Z/API/Z/ABIs/generic/data codec.h +33 -0
- data/src/external/Z/API/Z/ABIs/generic/emulation.h +103 -0
- data/src/external/Z/API/Z/ABIs/generic/hash function.h +33 -0
- data/src/external/Z/API/Z/ABIs/generic/module.h +33 -0
- data/src/external/Z/API/Z/ABIs/generic/wave codec.h +40 -0
- data/src/external/Z/API/Z/classes/base/InitializerList.hpp +34 -0
- data/src/external/Z/API/Z/classes/base/OpaqueFunctionPointer.hpp +26 -0
- data/src/external/Z/API/Z/classes/base/OpaqueMemberFunctionPointer.hpp +26 -0
- data/src/external/Z/API/Z/classes/base/Pair.hpp +46 -0
- data/src/external/Z/API/Z/classes/base/Range.hpp +111 -0
- data/src/external/Z/API/Z/classes/base/SizedString.hpp +66 -0
- data/src/external/Z/API/Z/classes/base/Status.hpp +89 -0
- data/src/external/Z/API/Z/classes/base/Symbol.hpp +39 -0
- data/src/external/Z/API/Z/classes/base/Tuple.hpp +111 -0
- data/src/external/Z/API/Z/classes/base/Value2D.hpp +389 -0
- data/src/external/Z/API/Z/classes/base/Value3D.hpp +368 -0
- data/src/external/Z/API/Z/classes/buffering/RingBuffer.hpp +93 -0
- data/src/external/Z/API/Z/classes/buffering/TripleBuffer.hpp +68 -0
- data/src/external/Z/API/Z/classes/functional/Functor.hpp +265 -0
- data/src/external/Z/API/Z/classes/functional/MemberFunction.hpp +98 -0
- data/src/external/Z/API/Z/classes/functional/ObjectMemberFunction.hpp +172 -0
- data/src/external/Z/API/Z/classes/functional/ObjectSelector.hpp +219 -0
- data/src/external/Z/API/Z/classes/functional/Selector.hpp +146 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABB.hpp +81 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABR.hpp +685 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Box.hpp +219 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Circle.hpp +80 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line2D.hpp +93 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line3D.hpp +80 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Rectangle.hpp +675 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Sphere.hpp +0 -0
- data/src/external/Z/API/Z/classes/memory/Shared.hpp +90 -0
- data/src/external/Z/API/Z/constants/base.h +35 -0
- data/src/external/Z/API/Z/constants/chemical elements.h +6385 -0
- data/src/external/Z/API/Z/constants/numbers.h +963 -0
- data/src/external/Z/API/Z/constants/version.h +15 -0
- data/src/external/Z/API/Z/formats/character set/ASCII.h +158 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP437.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP737.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP775.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP850.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP852.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP855.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP857.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP858.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP860.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP861.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP862.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP863.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP864.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP865.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP866.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP869.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP872.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP874.h +159 -0
- data/src/external/Z/API/Z/formats/character set/Unicode.h +30119 -0
- data/src/external/Z/API/Z/formats/data model/I16LP32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/ILP32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/ILP64.h +19 -0
- data/src/external/Z/API/Z/formats/data model/IP16L32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/LLP64.h +19 -0
- data/src/external/Z/API/Z/formats/data model/LP32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/LP64.h +19 -0
- data/src/external/Z/API/Z/formats/data model/SILP64.h +19 -0
- data/src/external/Z/API/Z/formats/file system/FAT12.h +61 -0
- data/src/external/Z/API/Z/formats/floating-point/IEEE 754.h +141 -0
- data/src/external/Z/API/Z/formats/floating-point/x87.h +74 -0
- data/src/external/Z/API/Z/formats/image/ICNS.h +39 -0
- data/src/external/Z/API/Z/formats/keymap/Mac OS.h +284 -0
- data/src/external/Z/API/Z/formats/keymap/Z.h +141 -0
- data/src/external/Z/API/Z/formats/multimedia/Creative Voice.h +106 -0
- data/src/external/Z/API/Z/formats/multimedia/Microsoft Wave.h +49 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ACH.h +44 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/FRZ.h +54 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/PRG.h +33 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SEM.h +46 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SIT.h +34 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNA.h +117 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNP.h +37 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SP.h +62 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/Z80.h +117 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX.h +56 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX82.h +70 -0
- data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/UNIF.h +26 -0
- data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/iNES.h +76 -0
- data/src/external/Z/API/Z/formats/storage medium image/audio/TAP.h +25 -0
- data/src/external/Z/API/Z/formats/storage medium image/audio/TZX.h +1185 -0
- data/src/external/Z/API/Z/formats/storage medium image/audio/Warajevo TAP.h +32 -0
- data/src/external/Z/API/Z/formats/storage medium image/floppy disk/FDI.h +45 -0
- data/src/external/Z/API/Z/functions/base/Z2D.h +583 -0
- data/src/external/Z/API/Z/functions/base/Z3D.h +712 -0
- data/src/external/Z/API/Z/functions/base/ZRange.h +137 -0
- data/src/external/Z/API/Z/functions/base/all.h +16 -0
- data/src/external/Z/API/Z/functions/base/casting.hpp +37 -0
- data/src/external/Z/API/Z/functions/base/character.h +38 -0
- data/src/external/Z/API/Z/functions/base/constructors.h +326 -0
- data/src/external/Z/API/Z/functions/base/structure.hpp +26 -0
- data/src/external/Z/API/Z/functions/base/type.hpp +60 -0
- data/src/external/Z/API/Z/functions/base/value.h +1901 -0
- data/src/external/Z/API/Z/functions/base/value.hpp +112 -0
- data/src/external/Z/API/Z/functions/buffering/ZRingBuffer.h +85 -0
- data/src/external/Z/API/Z/functions/buffering/ZTripleBuffer.h +65 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z2DLine.h +179 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z3DLine.h +168 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABB.h +361 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABR.h +1081 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZBox.h +340 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZCircle.h +142 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZRectangle.h +1267 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZSphere.h +156 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/all.h +18 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/constructors.h +620 -0
- data/src/external/Z/API/Z/functions/time/date.h +29 -0
- data/src/external/Z/API/Z/hardware/CPU/architecture/6502.h +90 -0
- data/src/external/Z/API/Z/hardware/CPU/architecture/Z80.h +245 -0
- data/src/external/Z/API/Z/hardware/CPU/architecture/i4004.h +37 -0
- data/src/external/Z/API/Z/hardware/PSG/General Instrument/AY-3-891x.h +180 -0
- data/src/external/Z/API/Z/hardware/VDC/Ricoh/RP2C0x.h +625 -0
- data/src/external/Z/API/Z/hardware/bus/AGP.h +24 -0
- data/src/external/Z/API/Z/hardware/bus/USB.h +510 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Inves Spectrum +.h +47 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Pentagon.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Scorpion.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum + 128K.h +158 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +.h +82 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2A.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +3.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum.h +109 -0
- data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (NTSC).h +29 -0
- data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (PAL).h +29 -0
- data/src/external/Z/API/Z/hardware/machine/platform/computer/ZX Spectrum.h +405 -0
- data/src/external/Z/API/Z/hardware/machine/platform/console/Game Boy.h +49 -0
- data/src/external/Z/API/Z/hardware/machine/platform/console/Nintendo Entertainment System.h +350 -0
- data/src/external/Z/API/Z/hardware/storage medium/ROM cartridge/SNES Game Pak.h +238 -0
- data/src/external/Z/API/Z/inspection/C/completion.h +178 -0
- data/src/external/Z/API/Z/inspection/C/modules/C11.h +41 -0
- data/src/external/Z/API/Z/inspection/C/modules/C18.h +13 -0
- data/src/external/Z/API/Z/inspection/C/modules/C89.h +19 -0
- data/src/external/Z/API/Z/inspection/C/modules/C90.h +13 -0
- data/src/external/Z/API/Z/inspection/C/modules/C94.h +15 -0
- data/src/external/Z/API/Z/inspection/C/modules/C99.h +29 -0
- data/src/external/Z/API/Z/inspection/C/modules/KR C.h +19 -0
- data/src/external/Z/API/Z/inspection/C++/completion.h +512 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++03.h +15 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++11.h +80 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++14.h +26 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++17.h +55 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++85.h +11 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++89.h +13 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++98.h +17 -0
- data/src/external/Z/API/Z/inspection/C++.h +78 -0
- data/src/external/Z/API/Z/inspection/C.h +79 -0
- data/src/external/Z/API/Z/inspection/CPU/completion.h +56 -0
- data/src/external/Z/API/Z/inspection/CPU/detection.h +714 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/6502.h +25 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/AArch32.h +32 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/AArch64.h +32 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/Z80.h +26 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/x86-32.h +31 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/x86-64.h +312 -0
- data/src/external/Z/API/Z/inspection/CPU.h +209 -0
- data/src/external/Z/API/Z/inspection/OS/completion.h +36 -0
- data/src/external/Z/API/Z/inspection/OS/detection.h +768 -0
- data/src/external/Z/API/Z/inspection/OS/modules/Linux.h +22 -0
- data/src/external/Z/API/Z/inspection/OS/modules/MS-DOS.h +16 -0
- data/src/external/Z/API/Z/inspection/OS/modules/Mac OS X.h +23 -0
- data/src/external/Z/API/Z/inspection/OS/modules/Windows.h +19 -0
- data/src/external/Z/API/Z/inspection/OS/modules/iPhone OS.h +23 -0
- data/src/external/Z/API/Z/inspection/OS.h +236 -0
- data/src/external/Z/API/Z/inspection/Objective-C/completion.h +8 -0
- data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v1.0.h +11 -0
- data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v2.0.h +15 -0
- data/src/external/Z/API/Z/inspection/Objective-C.h +51 -0
- data/src/external/Z/API/Z/inspection/Z.h +19 -0
- data/src/external/Z/API/Z/inspection/build.h +22 -0
- data/src/external/Z/API/Z/inspection/character set.h +66 -0
- data/src/external/Z/API/Z/inspection/compiler/completion.h +2885 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/Apple LLVM.h +26 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/Clang.h +1664 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/GCC.h +1366 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/SCCZ80.h +473 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/Visual C++.h +606 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/cc65.h +529 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/generic.h +13 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/template.h +650 -0
- data/src/external/Z/API/Z/inspection/compiler.h +299 -0
- data/src/external/Z/API/Z/inspection/data model/completion.h +128 -0
- data/src/external/Z/API/Z/inspection/data model/deduction.h +9 -0
- data/src/external/Z/API/Z/inspection/data model/detection.h +45 -0
- data/src/external/Z/API/Z/inspection/data model.h +362 -0
- data/src/external/Z/API/Z/inspection/floating-point/completion.h +50 -0
- data/src/external/Z/API/Z/inspection/floating-point.h +324 -0
- data/src/external/Z/API/Z/inspection/language.h +163 -0
- data/src/external/Z/API/Z/inspection/platform/detection.h +9 -0
- data/src/external/Z/API/Z/inspection/platform.h +29 -0
- data/src/external/Z/API/Z/keys/C++.h +27 -0
- data/src/external/Z/API/Z/keys/C.h +29 -0
- data/src/external/Z/API/Z/keys/CPU.h +80 -0
- data/src/external/Z/API/Z/keys/OS.h +182 -0
- data/src/external/Z/API/Z/keys/Objective-C.h +17 -0
- data/src/external/Z/API/Z/keys/chemistry.h +26 -0
- data/src/external/Z/API/Z/keys/compiler.h +178 -0
- data/src/external/Z/API/Z/keys/data model.h +32 -0
- data/src/external/Z/API/Z/keys/endianness.h +24 -0
- data/src/external/Z/API/Z/keys/language.h +21 -0
- data/src/external/Z/API/Z/keys/layout.h +20 -0
- data/src/external/Z/API/Z/keys/mathematics/geometry.h +29 -0
- data/src/external/Z/API/Z/keys/mathematics/number.h +21 -0
- data/src/external/Z/API/Z/keys/order.h +18 -0
- data/src/external/Z/API/Z/keys/platform.h +87 -0
- data/src/external/Z/API/Z/keys/program.h +39 -0
- data/src/external/Z/API/Z/keys/science/chemical elements.h +200 -0
- data/src/external/Z/API/Z/keys/science/electricity.h +18 -0
- data/src/external/Z/API/Z/keys/science/magnetism.h +19 -0
- data/src/external/Z/API/Z/keys/status.h +69 -0
- data/src/external/Z/API/Z/keys/text.h +27 -0
- data/src/external/Z/API/Z/keys/value.h +88 -0
- data/src/external/Z/API/Z/macros/arguments.h +25 -0
- data/src/external/Z/API/Z/macros/casting.h +22 -0
- data/src/external/Z/API/Z/macros/character.h +159 -0
- data/src/external/Z/API/Z/macros/date.h +14 -0
- data/src/external/Z/API/Z/macros/key.h +20 -0
- data/src/external/Z/API/Z/macros/language.h +126 -0
- data/src/external/Z/API/Z/macros/language.hpp +81 -0
- data/src/external/Z/API/Z/macros/members.h +86 -0
- data/src/external/Z/API/Z/macros/pasting.h +308 -0
- data/src/external/Z/API/Z/macros/pointer.h +33 -0
- data/src/external/Z/API/Z/macros/repetition.h +283 -0
- data/src/external/Z/API/Z/macros/structure.h +104 -0
- data/src/external/Z/API/Z/macros/templating.h +407 -0
- data/src/external/Z/API/Z/macros/tokens.h +14 -0
- data/src/external/Z/API/Z/macros/type enumeration.h +43 -0
- data/src/external/Z/API/Z/macros/type selection.hpp +76 -0
- data/src/external/Z/API/Z/macros/value.h +489 -0
- data/src/external/Z/API/Z/macros/variadic pasting.h +21 -0
- data/src/external/Z/API/Z/macros/variadic selection.h +56 -0
- data/src/external/Z/API/Z/macros/variadic.h +46 -0
- data/src/external/Z/API/Z/macros/version.h +17 -0
- data/src/external/Z/API/Z/network/3/IP.h +36 -0
- data/src/external/Z/API/Z/network/4/TCP.h +24 -0
- data/src/external/Z/API/Z/network/4/UDP.h +26 -0
- data/src/external/Z/API/Z/network/7/ED2K.h +104 -0
- data/src/external/Z/API/Z/network/7/HTTP.h +100 -0
- data/src/external/Z/API/Z/traits/SelectType.hpp +71 -0
- data/src/external/Z/API/Z/traits/TernaryType.hpp +20 -0
- data/src/external/Z/API/Z/traits/Type.hpp +4516 -0
- data/src/external/Z/API/Z/traits/TypeCount.hpp +52 -0
- data/src/external/Z/API/Z/traits/TypeList.hpp +376 -0
- data/src/external/Z/API/Z/traits/base.hpp +19 -0
- data/src/external/Z/API/Z/traits/filtering.hpp +30 -0
- data/src/external/Z/API/Z/traits/mathematics.hpp +48 -0
- data/src/external/Z/API/Z/types/arguments.h +19 -0
- data/src/external/Z/API/Z/types/base.h +1655 -0
- data/src/external/Z/API/Z/types/base.hpp +169 -0
- data/src/external/Z/API/Z/types/buffering.h +27 -0
- data/src/external/Z/API/Z/types/mathematics.h +135 -0
- data/src/external/Z/API/Z/types/time.h +23 -0
- data/src/external/Z/COPYING.LESSER +165 -0
- data/src/external/Z/development/Qt Creator/Z.pro +253 -0
- data/src/external/Z/distribution/CocoaPods/Zeta.podspec +18 -0
- data/src/external/Z/distribution/Gentoo Linux/Zeta-0.1.ebuild +22 -0
- data/src/external/Z/distribution/Gentoo Linux/metadata.xml +8 -0
- data/src/external/Z/distribution/Homebrew/Zeta.rb +11 -0
- data/src/external/z80/API/emulation/CPU/Z80.h +201 -0
- data/src/external/z80/README.md +229 -0
- data/src/external/z80/building/premake4.lua +33 -0
- data/src/external/z80/development/Xcode/Z80.xcodeproj/project.pbxproj +520 -0
- data/src/external/z80/sources/Z80.c +1660 -0
- data/src/interrupt.c +6 -0
- data/src/interrupt.h +3 -0
- data/src/io.c.erb +115 -0
- data/src/io.h.erb +18 -0
- data/src/main.c +69 -0
- data/src/memory.c.erb +43 -0
- data/src/memory.h.erb +9 -0
- metadata +329 -0
@@ -0,0 +1,620 @@
|
|
1
|
+
/* Z Kit - functions/mathematics/geometry/euclidean/constructors.h
|
2
|
+
_____ _______________
|
3
|
+
/_ /_/ -_/_ _/ _ |
|
4
|
+
/____/\___/ /__//___/_| Kit
|
5
|
+
Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
|
6
|
+
Released under the terms of the GNU Lesser General Public License v3. */
|
7
|
+
|
8
|
+
#ifndef _Z_functions_mathematics_geometry_euclidean_constructors_H_
|
9
|
+
#define _Z_functions_mathematics_geometry_euclidean_constructors_H_
|
10
|
+
|
11
|
+
#include <Z/types/mathematics.h>
|
12
|
+
|
13
|
+
#if Z_LANGUAGE_HAS(C, COMPOUND_LITERAL)
|
14
|
+
|
15
|
+
# define z_2d_line_sint8(a_x, a_y, b_x, b_y) \
|
16
|
+
((Z2DLineSInt8){{a_x, a_y}, {b_x, b_y}})
|
17
|
+
|
18
|
+
# define z_3d_line_sint8(a_x, a_y, a_z, b_x, b_y, b_z) \
|
19
|
+
((Z3DLineSInt8){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
20
|
+
|
21
|
+
# define z_box_sint8(point_x, point_y, point_z, size_x, size_y, size_z) \
|
22
|
+
((ZBoxSInt8){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
23
|
+
|
24
|
+
# define z_rectangle_sint8(point_x, point_y, size_x, size_y) \
|
25
|
+
((ZRectangleSInt8){{point_x, point_y}, {size_x, size_y}})
|
26
|
+
|
27
|
+
# define z_2d_line_sint16(a_x, a_y, b_x, b_y) \
|
28
|
+
((Z2DLineSInt16){{a_x, a_y}, {b_x, b_y}})
|
29
|
+
|
30
|
+
# define z_3d_line_sint16(a_x, a_y, a_z, b_x, b_y, b_z) \
|
31
|
+
((Z3DLineSInt16){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
32
|
+
|
33
|
+
# define z_box_sint16(point_x, point_y, point_z, size_x, size_y, size_z) \
|
34
|
+
((ZBoxSInt16){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
35
|
+
|
36
|
+
# define z_rectangle_sint16(point_x, point_y, size_x, size_y) \
|
37
|
+
((ZRectangleSInt16){{point_x, point_y}, {size_x, size_y}})
|
38
|
+
|
39
|
+
# define z_2d_line_sint32(a_x, a_y, b_x, b_y) \
|
40
|
+
((Z2DLineSInt32){{a_x, a_y}, {b_x, b_y}})
|
41
|
+
|
42
|
+
# define z_3d_line_sint32(a_x, a_y, a_z, b_x, b_y, b_z) \
|
43
|
+
((Z3DLineSInt32){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
44
|
+
|
45
|
+
# define z_box_sint32(point_x, point_y, point_z, size_x, size_y, size_z) \
|
46
|
+
((ZBoxSInt32){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
47
|
+
|
48
|
+
# define z_rectangle_sint32(point_x, point_y, size_x, size_y) \
|
49
|
+
((ZRectangleSInt32){{point_x, point_y}, {size_x, size_y}})
|
50
|
+
|
51
|
+
# ifdef Z_SINT64
|
52
|
+
|
53
|
+
# define z_2d_line_sint64(a_x, a_y, b_x, b_y) \
|
54
|
+
((Z2DLineSInt64){{a_x, a_y}, {b_x, b_y}})
|
55
|
+
|
56
|
+
# define z_3d_line_sint64(a_x, a_y, a_z, b_x, b_y, b_z) \
|
57
|
+
((Z3DLineSInt64){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
58
|
+
|
59
|
+
# define z_box_sint64(point_x, point_y, point_z, size_x, size_y, size_z) \
|
60
|
+
((ZBoxSInt64){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
61
|
+
|
62
|
+
# define z_rectangle_sint64(point_x, point_y, size_x, size_y) \
|
63
|
+
((ZRectangleSInt64){{point_x, point_y}, {size_x, size_y}})
|
64
|
+
|
65
|
+
# endif
|
66
|
+
|
67
|
+
# ifdef Z_SINT128
|
68
|
+
|
69
|
+
# define z_2d_line_sint128(a_x, a_y, b_x, b_y) \
|
70
|
+
((Z2DLineSInt128){{a_x, a_y}, {b_x, b_y}})
|
71
|
+
|
72
|
+
# define z_3d_line_sint128(a_x, a_y, a_z, b_x, b_y, b_z) \
|
73
|
+
((Z3DLineSInt128){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
74
|
+
|
75
|
+
# define z_box_sint128(point_x, point_y, point_z, size_x, size_y, size_z) \
|
76
|
+
((ZBoxSInt128){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
77
|
+
|
78
|
+
# define z_rectangle_sint128(point_x, point_y, size_x, size_y) \
|
79
|
+
((ZRectangleSInt128){{point_x, point_y}, {size_x, size_y}})
|
80
|
+
|
81
|
+
# endif
|
82
|
+
|
83
|
+
# ifdef Z_FLOAT16
|
84
|
+
|
85
|
+
# define z_2d_line_float16(a_x, a_y, b_x, b_y) \
|
86
|
+
((Z2DLineFloat16){{a_x, a_y}, {b_x, b_y}})
|
87
|
+
|
88
|
+
# define z_3d_line_float16(a_x, a_y, a_z, b_x, b_y, b_z) \
|
89
|
+
((Z3DLineFloat16){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
90
|
+
|
91
|
+
# define z_box_float16(point_x, point_y, point_z, size_x, size_y, size_z) \
|
92
|
+
((ZBoxFloat16){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
93
|
+
|
94
|
+
# define z_circle_float16(point_x, point_y, radius) \
|
95
|
+
((ZCircleFloat16){{point_x, point_y}, radius})
|
96
|
+
|
97
|
+
# define z_rectangle_float16(point_x, point_y, size_x, size_y) \
|
98
|
+
((ZRectangleFloat16){{point_x, point_y}, {size_x, size_y}})
|
99
|
+
|
100
|
+
# define z_sphere_float16(point_x, point_y, point_z, radius) \
|
101
|
+
((ZCircleFloat16){{point_x, point_y, point_z}, radius})
|
102
|
+
|
103
|
+
# endif
|
104
|
+
|
105
|
+
# ifdef Z_FLOAT32
|
106
|
+
|
107
|
+
# define z_2d_line_float32(a_x, a_y, b_x, b_y) \
|
108
|
+
((Z2DLineFloat32){{a_x, a_y}, {b_x, b_y}})
|
109
|
+
|
110
|
+
# define z_3d_line_float32(a_x, a_y, a_z, b_x, b_y, b_z) \
|
111
|
+
((Z3DLineFloat32){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
112
|
+
|
113
|
+
# define z_box_float32(point_x, point_y, point_z, size_x, size_y, size_z) \
|
114
|
+
((ZBoxFloat32){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
115
|
+
|
116
|
+
# define z_circle_float32(point_x, point_y, radius) \
|
117
|
+
((ZCircleFloat32){{point_x, point_y}, radius})
|
118
|
+
|
119
|
+
# define z_rectangle_float32(point_x, point_y, size_x, size_y) \
|
120
|
+
((ZRectangleFloat32){{point_x, point_y}, {size_x, size_y}})
|
121
|
+
|
122
|
+
# define z_sphere_float32(point_x, point_y, point_z, radius) \
|
123
|
+
((ZCircleFloat32){{point_x, point_y, point_z}, radius})
|
124
|
+
|
125
|
+
# endif
|
126
|
+
|
127
|
+
# ifdef Z_FLOAT64
|
128
|
+
|
129
|
+
# define z_2d_line_float64(a_x, a_y, b_x, b_y) \
|
130
|
+
((Z2DLineFloat64){{a_x, a_y}, {b_x, b_y}})
|
131
|
+
|
132
|
+
# define z_3d_line_float64(a_x, a_y, a_z, b_x, b_y, b_z) \
|
133
|
+
((Z3DLineFloat64){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
134
|
+
|
135
|
+
# define z_box_float64(point_x, point_y, point_z, size_x, size_y, size_z) \
|
136
|
+
((ZBoxFloat64){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
137
|
+
|
138
|
+
# define z_circle_float64(point_x, point_y, radius) \
|
139
|
+
((ZCircleFloat64){{point_x, point_y}, radius})
|
140
|
+
|
141
|
+
# define z_rectangle_float64(point_x, point_y, size_x, size_y) \
|
142
|
+
((ZRectangleFloat64){{point_x, point_y}, {size_x, size_y}})
|
143
|
+
|
144
|
+
# define z_sphere_float64(point_x, point_y, point_z, radius) \
|
145
|
+
((ZCircleFloat64){{point_x, point_y, point_z}, radius})
|
146
|
+
|
147
|
+
# endif
|
148
|
+
|
149
|
+
# ifdef Z_FLOAT128
|
150
|
+
|
151
|
+
# define z_2d_line_float128(a_x, a_y, b_x, b_y) \
|
152
|
+
((Z2DLineFloat128){{a_x, a_y}, {b_x, b_y}})
|
153
|
+
|
154
|
+
# define z_3d_line_float128(a_x, a_y, a_z, b_x, b_y, b_z) \
|
155
|
+
((Z3DLineFloat128){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
156
|
+
|
157
|
+
# define z_box_float128(point_x, point_y, point_z, size_x, size_y, size_z) \
|
158
|
+
((ZBoxFloat128){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
159
|
+
|
160
|
+
# define z_circle_float128(point_x, point_y, radius) \
|
161
|
+
((ZCircleFloat128){{point_x, point_y}, radius})
|
162
|
+
|
163
|
+
# define z_rectangle_float128(point_x, point_y, size_x, size_y) \
|
164
|
+
((ZRectangleFloat128){{point_x, point_y}, {size_x, size_y}})
|
165
|
+
|
166
|
+
# define z_sphere_float128(point_x, point_y, point_z, radius) \
|
167
|
+
((ZCircleFloat128){{point_x, point_y, point_z}, radius})
|
168
|
+
|
169
|
+
# endif
|
170
|
+
|
171
|
+
# ifdef Z_FLOAT80_X87
|
172
|
+
|
173
|
+
# define z_2d_line_float80_x87(a_x, a_y, b_x, b_y) \
|
174
|
+
((Z2DLineFloat80_x87){{a_x, a_y}, {b_x, b_y}})
|
175
|
+
|
176
|
+
# define z_3d_line_float80_x87(a_x, a_y, a_z, b_x, b_y, b_z) \
|
177
|
+
((Z3DLineFloat80_x87){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
178
|
+
|
179
|
+
# define z_box_float80_x87(point_x, point_y, point_z, size_x, size_y, size_z) \
|
180
|
+
((ZBoxFloat80_x87){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
181
|
+
|
182
|
+
# define z_circle_float80_x87(point_x, point_y, radius) \
|
183
|
+
((ZCircleFloat80_x87){{point_x, point_y}, radius})
|
184
|
+
|
185
|
+
# define z_rectangle_float80_x87(point_x, point_y, size_x, size_y) \
|
186
|
+
((ZRectangleFloat80_x87){{point_x, point_y}, {size_x, size_y}})
|
187
|
+
|
188
|
+
# define z_sphere_float80_x87(point_x, point_y, point_z, radius) \
|
189
|
+
((ZCircleFloat80_x87){{point_x, point_y, point_z}, radius})
|
190
|
+
|
191
|
+
# endif
|
192
|
+
|
193
|
+
# ifdef Z_FLOAT96_X87
|
194
|
+
|
195
|
+
# define z_2d_line_float96_x87(a_x, a_y, b_x, b_y) \
|
196
|
+
((Z2DLineFloat96_x87){{a_x, a_y}, {b_x, b_y}})
|
197
|
+
|
198
|
+
# define z_3d_line_float96_x87(a_x, a_y, a_z, b_x, b_y, b_z) \
|
199
|
+
((Z3DLineFloat96_x87){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
200
|
+
|
201
|
+
# define z_box_float96_x87(point_x, point_y, point_z, size_x, size_y, size_z) \
|
202
|
+
((ZBoxFloat96_x87){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
203
|
+
|
204
|
+
# define z_circle_float96_x87(point_x, point_y, radius) \
|
205
|
+
((ZCircleFloat96_x87){{point_x, point_y}, radius})
|
206
|
+
|
207
|
+
# define z_rectangle_float96_x87(point_x, point_y, size_x, size_y) \
|
208
|
+
((ZRectangleFloat96_x87){{point_x, point_y}, {size_x, size_y}})
|
209
|
+
|
210
|
+
# define z_sphere_float96_x87(point_x, point_y, point_z, radius) \
|
211
|
+
((ZCircleFloat96_x87){{point_x, point_y, point_z}, radius})
|
212
|
+
|
213
|
+
# endif
|
214
|
+
|
215
|
+
# ifdef Z_FLOAT128_X87
|
216
|
+
|
217
|
+
# define z_2d_line_float128_x87(a_x, a_y, b_x, b_y) \
|
218
|
+
((Z2DLineFloat128_x87){{a_x, a_y}, {b_x, b_y}})
|
219
|
+
|
220
|
+
# define z_3d_line_float128_x87(a_x, a_y, a_z, b_x, b_y, b_z) \
|
221
|
+
((Z3DLineFloat128_x87){{a_x, a_y, a_z}, {b_x, b_y, b_z}})
|
222
|
+
|
223
|
+
# define z_box_float128_x87(point_x, point_y, point_z, size_x, size_y, size_z) \
|
224
|
+
((ZBoxFloat128_x87){{point_x, point_y, point_z}, {size_x, size_y, size_z}})
|
225
|
+
|
226
|
+
# define z_circle_float128_x87(point_x, point_y, radius) \
|
227
|
+
((ZCircleFloat128_x87){{point_x, point_y}, radius})
|
228
|
+
|
229
|
+
# define z_rectangle_float128_x87(point_x, point_y, size_x, size_y) \
|
230
|
+
((ZRectangleFloat128_x87){{point_x, point_y}, {size_x, size_y}})
|
231
|
+
|
232
|
+
# define z_sphere_float128_x87(point_x, point_y, point_z, radius) \
|
233
|
+
((ZCircleFloat128_x87){{point_x, point_y, point_z}, radius})
|
234
|
+
|
235
|
+
# endif
|
236
|
+
|
237
|
+
#else
|
238
|
+
|
239
|
+
# define Z_IMPLEMENTATION_INTEGER(Type, type) \
|
240
|
+
\
|
241
|
+
static Z_INLINE \
|
242
|
+
Z2DLine##Type z_2d_line_##type( \
|
243
|
+
z##type a_x, \
|
244
|
+
z##type a_y, \
|
245
|
+
z##type b_x, \
|
246
|
+
z##type b_y \
|
247
|
+
) \
|
248
|
+
{ \
|
249
|
+
Z2DLine##Type object; \
|
250
|
+
\
|
251
|
+
object.a.x = a_x; \
|
252
|
+
object.a.y = a_y; \
|
253
|
+
object.b.x = b_x; \
|
254
|
+
object.b.y = b_y; \
|
255
|
+
return object; \
|
256
|
+
} \
|
257
|
+
\
|
258
|
+
\
|
259
|
+
static Z_INLINE \
|
260
|
+
Z3DLine##Type z_3d_line_##type( \
|
261
|
+
z##type a_x, \
|
262
|
+
z##type a_y, \
|
263
|
+
z##type a_z, \
|
264
|
+
z##type b_x, \
|
265
|
+
z##type b_y, \
|
266
|
+
z##type b_z \
|
267
|
+
) \
|
268
|
+
{ \
|
269
|
+
Z3DLine##Type object; \
|
270
|
+
\
|
271
|
+
object.a.x = a_x; \
|
272
|
+
object.a.y = a_y; \
|
273
|
+
object.a.z = a_z; \
|
274
|
+
object.b.x = b_x; \
|
275
|
+
object.b.y = b_y; \
|
276
|
+
object.b.z = b_z; \
|
277
|
+
return object; \
|
278
|
+
} \
|
279
|
+
\
|
280
|
+
\
|
281
|
+
static Z_INLINE \
|
282
|
+
ZBox##Type z_box_##type( \
|
283
|
+
z##type x, \
|
284
|
+
z##type y, \
|
285
|
+
z##type z, \
|
286
|
+
z##type size_x, \
|
287
|
+
z##type size_y, \
|
288
|
+
z##type size_z \
|
289
|
+
) \
|
290
|
+
{ \
|
291
|
+
ZBox##Type object; \
|
292
|
+
\
|
293
|
+
object.point.x = x; \
|
294
|
+
object.point.y = y; \
|
295
|
+
object.point.z = z; \
|
296
|
+
object.size.x = size_x; \
|
297
|
+
object.size.y = size_y; \
|
298
|
+
object.size.z = size_z; \
|
299
|
+
return object; \
|
300
|
+
} \
|
301
|
+
\
|
302
|
+
\
|
303
|
+
static Z_INLINE \
|
304
|
+
ZRectangle##Type z_rectangle_##type( \
|
305
|
+
z##type x, \
|
306
|
+
z##type y, \
|
307
|
+
z##type size_x, \
|
308
|
+
z##type size_y \
|
309
|
+
) \
|
310
|
+
{ \
|
311
|
+
ZRectangle##Type object; \
|
312
|
+
\
|
313
|
+
object.point.x = x; \
|
314
|
+
object.point.y = y; \
|
315
|
+
object.size.x = size_x; \
|
316
|
+
object.size.y = size_y; \
|
317
|
+
return object; \
|
318
|
+
}
|
319
|
+
|
320
|
+
|
321
|
+
# define Z_IMPLEMENTATION_REAL(Type, type) \
|
322
|
+
\
|
323
|
+
static Z_INLINE \
|
324
|
+
ZCircle##Type z_circle_##type( \
|
325
|
+
z##type x, \
|
326
|
+
z##type y, \
|
327
|
+
z##type radius \
|
328
|
+
) \
|
329
|
+
{ \
|
330
|
+
ZCircle##Type object; \
|
331
|
+
\
|
332
|
+
object.point.x = x; \
|
333
|
+
object.point.y = y; \
|
334
|
+
object.radius = radius; \
|
335
|
+
return object; \
|
336
|
+
} \
|
337
|
+
\
|
338
|
+
\
|
339
|
+
static Z_INLINE \
|
340
|
+
ZSphere##Type z_sphere_##type( \
|
341
|
+
z##type x, \
|
342
|
+
z##type y, \
|
343
|
+
z##type z, \
|
344
|
+
z##type radius \
|
345
|
+
) \
|
346
|
+
{ \
|
347
|
+
ZSphere##Type object; \
|
348
|
+
\
|
349
|
+
object.point.x = x; \
|
350
|
+
object.point.y = y; \
|
351
|
+
object.point.z = z; \
|
352
|
+
object.radius = radius; \
|
353
|
+
return object; \
|
354
|
+
}
|
355
|
+
|
356
|
+
|
357
|
+
Z_IMPLEMENTATION_INTEGER(SInt8, sint8 )
|
358
|
+
Z_IMPLEMENTATION_INTEGER(SInt16, sint16)
|
359
|
+
Z_IMPLEMENTATION_INTEGER(SInt32, sint32)
|
360
|
+
|
361
|
+
# ifdef Z_SINT64
|
362
|
+
Z_IMPLEMENTATION_INTEGER(SInt64, sint64)
|
363
|
+
# endif
|
364
|
+
|
365
|
+
# ifdef Z_SINT128
|
366
|
+
Z_IMPLEMENTATION_INTEGER(SInt128, sint128)
|
367
|
+
# endif
|
368
|
+
|
369
|
+
# ifdef Z_FLOAT16
|
370
|
+
Z_IMPLEMENTATION_INTEGER(Float16, float16)
|
371
|
+
Z_IMPLEMENTATION_REAL (Float16, float16)
|
372
|
+
# endif
|
373
|
+
|
374
|
+
# ifdef Z_FLOAT32
|
375
|
+
Z_IMPLEMENTATION_INTEGER(Float32, float32)
|
376
|
+
Z_IMPLEMENTATION_REAL (Float32, float32)
|
377
|
+
# endif
|
378
|
+
|
379
|
+
# ifdef Z_FLOAT64
|
380
|
+
Z_IMPLEMENTATION_INTEGER(Float64, float64)
|
381
|
+
Z_IMPLEMENTATION_REAL (Float64, float64)
|
382
|
+
# endif
|
383
|
+
|
384
|
+
# ifdef Z_FLOAT128
|
385
|
+
Z_IMPLEMENTATION_INTEGER(Float128, float128)
|
386
|
+
Z_IMPLEMENTATION_REAL (Float128, float128)
|
387
|
+
# endif
|
388
|
+
|
389
|
+
# ifdef Z_FLOAT80_X87
|
390
|
+
Z_IMPLEMENTATION_INTEGER(Float80_x87, float80_x87)
|
391
|
+
Z_IMPLEMENTATION_REAL (Float80_x87, float80_x87)
|
392
|
+
# endif
|
393
|
+
|
394
|
+
# ifdef Z_FLOAT96_X87
|
395
|
+
Z_IMPLEMENTATION_INTEGER(Float96_x87, float96_x87)
|
396
|
+
Z_IMPLEMENTATION_REAL (Float96_x87, float96_x87)
|
397
|
+
# endif
|
398
|
+
|
399
|
+
# ifdef Z_FLOAT128_X87
|
400
|
+
Z_IMPLEMENTATION_INTEGER(Float128_x87, float128_x87)
|
401
|
+
Z_IMPLEMENTATION_REAL (Float128_x87, float128_x87)
|
402
|
+
# endif
|
403
|
+
|
404
|
+
# undef Z_IMPLEMENTATION_INTEGER
|
405
|
+
# undef Z_IMPLEMENTATION_REAL
|
406
|
+
|
407
|
+
#endif
|
408
|
+
|
409
|
+
#define z_aabb_sint8 z_3d_line_sint8
|
410
|
+
#define z_aabr_sint8 z_2d_line_sint8
|
411
|
+
|
412
|
+
#define z_2d_line_sint8_zero z_2d_line_sint8 (0.0, 0.0, 0.0, 0.0)
|
413
|
+
#define z_3d_line_sint8_zero z_3d_line_sint8 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
414
|
+
#define z_aabb_sint8_zero z_3d_line_sint8_zero
|
415
|
+
#define z_aabr_sint8_zero z_2d_line_sint8_zero
|
416
|
+
#define z_box_sint8_zero z_box_sint8 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
417
|
+
#define z_rectangle_sint8_zero z_rectangle_sint8(0.0, 0.0, 0.0, 0.0)
|
418
|
+
|
419
|
+
#define z_aabb_sint16 z_3d_line_sint16
|
420
|
+
#define z_aabr_sint16 z_2d_line_sint16
|
421
|
+
|
422
|
+
#define z_2d_line_sint16_zero z_2d_line_sint16 (0.0, 0.0, 0.0, 0.0)
|
423
|
+
#define z_3d_line_sint16_zero z_3d_line_sint16 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
424
|
+
#define z_aabb_sint16_zero z_3d_line_sint16_zero
|
425
|
+
#define z_aabr_sint16_zero z_2d_line_sint16_zero
|
426
|
+
#define z_box_sint16_zero z_box_sint16 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
427
|
+
#define z_rectangle_sint16_zero z_rectangle_sint16(0.0, 0.0, 0.0, 0.0)
|
428
|
+
|
429
|
+
#define z_aabb_sint32 z_3d_line_sint32
|
430
|
+
#define z_aabr_sint32 z_2d_line_sint32
|
431
|
+
|
432
|
+
#define z_2d_line_sint32_zero z_2d_line_sint32 (0.0, 0.0, 0.0, 0.0)
|
433
|
+
#define z_3d_line_sint32_zero z_3d_line_sint32 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
434
|
+
#define z_aabb_sint32_zero z_3d_line_sint32_zero
|
435
|
+
#define z_aabr_sint32_zero z_2d_line_sint32_zero
|
436
|
+
#define z_box_sint32_zero z_box_sint32 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
437
|
+
#define z_rectangle_sint32_zero z_rectangle_sint32(0.0, 0.0, 0.0, 0.0)
|
438
|
+
|
439
|
+
#ifdef Z_SINT64
|
440
|
+
|
441
|
+
# define z_aabb_sint64 z_3d_line_sint64
|
442
|
+
# define z_aabr_sint64 z_2d_line_sint64
|
443
|
+
|
444
|
+
# define z_2d_line_sint64_zero z_2d_line_sint64 (0.0, 0.0, 0.0, 0.0)
|
445
|
+
# define z_3d_line_sint64_zero z_3d_line_sint64 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
446
|
+
# define z_aabb_sint64_zero z_3d_line_sint64_zero
|
447
|
+
# define z_aabr_sint64_zero z_2d_line_sint64_zero
|
448
|
+
# define z_box_sint64_zero z_box_sint64 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
449
|
+
# define z_rectangle_sint64_zero z_rectangle_sint64(0.0, 0.0, 0.0, 0.0)
|
450
|
+
|
451
|
+
#endif
|
452
|
+
|
453
|
+
#ifdef Z_SINT128
|
454
|
+
|
455
|
+
# define z_aabb_sint128 z_3d_line_sint128
|
456
|
+
# define z_aabr_sint128 z_2d_line_sint128
|
457
|
+
|
458
|
+
# define z_2d_line_sint128_zero z_2d_line_sint128 (0.0, 0.0, 0.0, 0.0)
|
459
|
+
# define z_3d_line_sint128_zero z_3d_line_sint128 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
460
|
+
# define z_aabb_sint128_zero z_3d_line_sint128_zero
|
461
|
+
# define z_aabr_sint128_zero z_2d_line_sint128_zero
|
462
|
+
# define z_box_sint128_zero z_box_sint128 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
463
|
+
# define z_rectangle_sint128_zero z_rectangle_sint128(0.0, 0.0, 0.0, 0.0)
|
464
|
+
|
465
|
+
#endif
|
466
|
+
|
467
|
+
#ifdef Z_FLOAT16
|
468
|
+
|
469
|
+
# define z_aabb_float16 z_3d_line_float16
|
470
|
+
# define z_aabr_float16 z_2d_line_float16
|
471
|
+
|
472
|
+
# define z_2d_line_float16_zero z_2d_line_float16 (0.0, 0.0, 0.0, 0.0)
|
473
|
+
# define z_3d_line_float16_zero z_3d_line_float16 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
474
|
+
# define z_aabb_float16_zero z_3d_line_float16_zero
|
475
|
+
# define z_aabr_float16_zero z_2d_line_float16_zero
|
476
|
+
# define z_box_float16_zero z_box_float16 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
477
|
+
# define z_circle_float16_zero z_circle_float16 (0.0, 0.0, 0.0)
|
478
|
+
# define z_rectangle_float16_zero z_rectangle_float16(0.0, 0.0, 0.0, 0.0)
|
479
|
+
# define z_sphere_float16_zero z_sphere_float16 (0.0, 0.0, 0.0, 0.0)
|
480
|
+
|
481
|
+
#endif
|
482
|
+
|
483
|
+
#ifdef Z_FLOAT32
|
484
|
+
|
485
|
+
# define z_aabb_float32 z_3d_line_float32
|
486
|
+
# define z_aabr_float32 z_2d_line_float32
|
487
|
+
|
488
|
+
# define z_2d_line_float32_zero z_2d_line_float32 (0.0, 0.0, 0.0, 0.0)
|
489
|
+
# define z_3d_line_float32_zero z_3d_line_float32 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
490
|
+
# define z_aabb_float32_zero z_3d_line_float32_zero
|
491
|
+
# define z_aabr_float32_zero z_2d_line_float32_zero
|
492
|
+
# define z_box_float32_zero z_box_float32 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
493
|
+
# define z_circle_float32_zero z_circle_float32 (0.0, 0.0, 0.0)
|
494
|
+
# define z_rectangle_float32_zero z_rectangle_float32(0.0, 0.0, 0.0, 0.0)
|
495
|
+
# define z_sphere_float32_zero z_sphere_float32 (0.0, 0.0, 0.0, 0.0)
|
496
|
+
|
497
|
+
#endif
|
498
|
+
|
499
|
+
#ifdef Z_FLOAT64
|
500
|
+
|
501
|
+
# define z_aabb_float64 z_3d_line_float64
|
502
|
+
# define z_aabr_float64 z_2d_line_float64
|
503
|
+
|
504
|
+
# define z_2d_line_float64_zero z_2d_line_float64 (0.0, 0.0, 0.0, 0.0)
|
505
|
+
# define z_3d_line_float64_zero z_3d_line_float64 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
506
|
+
# define z_aabb_float64_zero z_3d_line_float64_zero
|
507
|
+
# define z_aabr_float64_zero z_2d_line_float64_zero
|
508
|
+
# define z_box_float64_zero z_box_float64 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
509
|
+
# define z_circle_float64_zero z_circle_float64 (0.0, 0.0, 0.0)
|
510
|
+
# define z_rectangle_float64_zero z_rectangle_float64(0.0, 0.0, 0.0, 0.0)
|
511
|
+
# define z_sphere_float64_zero z_sphere_float64 (0.0, 0.0, 0.0, 0.0)
|
512
|
+
|
513
|
+
#endif
|
514
|
+
|
515
|
+
#ifdef Z_FLOAT128
|
516
|
+
|
517
|
+
# define z_aabb_float128 z_3d_line_float128
|
518
|
+
# define z_aabr_float128 z_2d_line_float128
|
519
|
+
|
520
|
+
# define z_2d_line_float128_zero z_2d_line_float128 (0.0, 0.0, 0.0, 0.0)
|
521
|
+
# define z_3d_line_float128_zero z_3d_line_float128 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
522
|
+
# define z_aabb_float128_zero z_3d_line_float128_zero
|
523
|
+
# define z_aabr_float128_zero z_2d_line_float128_zero
|
524
|
+
# define z_box_float128_zero z_box_float128 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
525
|
+
# define z_circle_float128_zero z_circle_float128 (0.0, 0.0, 0.0)
|
526
|
+
# define z_rectangle_float128_zero z_rectangle_float128(0.0, 0.0, 0.0, 0.0)
|
527
|
+
# define z_sphere_float128_zero z_sphere_float128 (0.0, 0.0, 0.0, 0.0)
|
528
|
+
|
529
|
+
#endif
|
530
|
+
|
531
|
+
#ifdef Z_FLOAT80_X87
|
532
|
+
|
533
|
+
# define z_aabb_float80_x87 z_3d_line_float80_x87
|
534
|
+
# define z_aabr_float80_x87 z_2d_line_float80_x87
|
535
|
+
|
536
|
+
# define z_2d_line_float80_x87_zero z_2d_line_float80_x87 (0.0, 0.0, 0.0, 0.0)
|
537
|
+
# define z_3d_line_float80_x87_zero z_3d_line_float80_x87 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
538
|
+
# define z_aabb_float80_x87_zero z_3d_line_float80_x87_zero
|
539
|
+
# define z_aabr_float80_x87_zero z_2d_line_float80_x87_zero
|
540
|
+
# define z_box_float80_x87_zero z_box_float80_x87 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
541
|
+
# define z_circle_float80_x87_zero z_circle_float80_x87 (0.0, 0.0, 0.0)
|
542
|
+
# define z_rectangle_float80_x87_zero z_rectangle_float80_x87(0.0, 0.0, 0.0, 0.0)
|
543
|
+
# define z_sphere_float80_x87_zero z_sphere_float80_x87 (0.0, 0.0, 0.0, 0.0)
|
544
|
+
|
545
|
+
#endif
|
546
|
+
|
547
|
+
#ifdef Z_FLOAT96_X87
|
548
|
+
|
549
|
+
# define z_aabb_float96_x87 z_3d_line_float96_x87
|
550
|
+
# define z_aabr_float96_x87 z_2d_line_float96_x87
|
551
|
+
|
552
|
+
# define z_2d_line_float96_x87_zero z_2d_line_float96_x87 (0.0, 0.0, 0.0, 0.0)
|
553
|
+
# define z_3d_line_float96_x87_zero z_3d_line_float96_x87 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
554
|
+
# define z_aabb_float96_x87_zero z_3d_line_float96_x87_zero
|
555
|
+
# define z_aabr_float96_x87_zero z_2d_line_float96_x87_zero
|
556
|
+
# define z_box_float96_x87_zero z_box_float96_x87 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
557
|
+
# define z_circle_float96_x87_zero z_circle_float96_x87 (0.0, 0.0, 0.0)
|
558
|
+
# define z_rectangle_float96_x87_zero z_rectangle_float96_x87(0.0, 0.0, 0.0, 0.0)
|
559
|
+
# define z_sphere_float96_x87_zero z_sphere_float96_x87 (0.0, 0.0, 0.0, 0.0)
|
560
|
+
|
561
|
+
#endif
|
562
|
+
|
563
|
+
#ifdef Z_FLOAT128_X87
|
564
|
+
|
565
|
+
# define z_aabb_float128_x87 z_3d_line_float128_x87
|
566
|
+
# define z_aabr_float128_x87 z_2d_line_float128_x87
|
567
|
+
|
568
|
+
# define z_2d_line_float128_x87_zero z_2d_line_float128_x87 (0.0, 0.0, 0.0, 0.0)
|
569
|
+
# define z_3d_line_float128_x87_zero z_3d_line_float128_x87 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
570
|
+
# define z_aabb_float128_x87_zero z_3d_line_float128_x87_zero
|
571
|
+
# define z_aabr_float128_x87_zero z_2d_line_float128_x87_zero
|
572
|
+
# define z_box_float128_x87_zero z_box_float128_x87 (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
|
573
|
+
# define z_circle_float128_x87_zero z_circle_float128_x87 (0.0, 0.0, 0.0)
|
574
|
+
# define z_rectangle_float128_x87_zero z_rectangle_float128_x87(0.0, 0.0, 0.0, 0.0)
|
575
|
+
# define z_sphere_float128_x87_zero z_sphere_float128_x87 (0.0, 0.0, 0.0, 0.0)
|
576
|
+
|
577
|
+
#endif
|
578
|
+
|
579
|
+
#define z_2d_line_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_2d_line_ )
|
580
|
+
#define z_3d_line_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_3d_line_ )
|
581
|
+
#define z_aabb_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_aabb_ )
|
582
|
+
#define z_aabr_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_aabr_ )
|
583
|
+
#define z_box_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_box_type )
|
584
|
+
#define z_circle_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_circle_ )
|
585
|
+
#define z_rectangle_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_rectangle_)
|
586
|
+
#define z_sphere_type( TYPE) Z_APPEND_##TYPE##_fixed_type(z_sphere_ )
|
587
|
+
#define z_2d_line_type_zero( TYPE) Z_INSERT_##TYPE##_fixed_type(z_2d_line_, _zero)
|
588
|
+
#define z_3d_line_type_zero( TYPE) Z_INSERT_##TYPE##_fixed_type(z_3d_line_, _zero)
|
589
|
+
#define z_aabb_type_zero( TYPE) Z_INSERT_##TYPE##_fixed_type(z_aabb_, _zero)
|
590
|
+
#define z_aabr_type_zero( TYPE) Z_INSERT_##TYPE##_fixed_type(z_aabr_, _zero)
|
591
|
+
#define z_box_type_zero( TYPE) Z_INSERT_##TYPE##_fixed_type(z_box_, _zero)
|
592
|
+
#define z_circle_type_zero( TYPE) Z_INSERT_##TYPE##_fixed_type(z_circle_, _zero)
|
593
|
+
#define z_rectangle_type_zero(TYPE) Z_INSERT_##TYPE##_fixed_type(z_rectangle_, _zero)
|
594
|
+
#define z_sphere_type_zero( TYPE) Z_INSERT_##TYPE##_fixed_type(z_sphere_, _zero)
|
595
|
+
|
596
|
+
/* MARK: - Default real type definitions */
|
597
|
+
|
598
|
+
#ifdef Z_REAL
|
599
|
+
|
600
|
+
# define z_2d_line z_2d_line_type (REAL)
|
601
|
+
# define z_3d_line z_3d_line_type (REAL)
|
602
|
+
# define z_aabb z_3d_line
|
603
|
+
# define z_aabr z_2d_line
|
604
|
+
# define z_box z_box_type (REAL)
|
605
|
+
# define z_circle z_circle_type (REAL)
|
606
|
+
# define z_rectangle z_rectangle_type(REAL)
|
607
|
+
# define z_sphere z_sphere_type (REAL)
|
608
|
+
|
609
|
+
# define z_2d_line_zero z_2d_line_type_zero (REAL)
|
610
|
+
# define z_3d_line_zero z_3d_line_type_zero (REAL)
|
611
|
+
# define z_aabb_zero z_3d_line_zero
|
612
|
+
# define z_aabr_zero z_2d_line_zero
|
613
|
+
# define z_box_zero z_box_type_zero (REAL)
|
614
|
+
# define z_circle_zero z_circle_type_zero (REAL)
|
615
|
+
# define z_rectangle_zero z_rectangle_type_zero(REAL)
|
616
|
+
# define z_sphere_zero z_sphere_type_zero (REAL)
|
617
|
+
|
618
|
+
#endif
|
619
|
+
|
620
|
+
#endif /* _Z_functions_mathematics_geometry_euclidean_constructors_H_ */
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/* Z Kit - functions/time/date.h
|
2
|
+
_____ _______________
|
3
|
+
/_ /_/ -_/_ _/ _ |
|
4
|
+
/____/\___/ /__//___/_| Kit
|
5
|
+
Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
|
6
|
+
Released under the terms of the GNU Lesser General Public License v3. */
|
7
|
+
|
8
|
+
#ifndef _Z_functions_time_date_H_
|
9
|
+
#define _Z_functions_time_date_H_
|
10
|
+
|
11
|
+
#include <Z/types/base.h>
|
12
|
+
#include <Z/macros/date.h>
|
13
|
+
|
14
|
+
|
15
|
+
static Z_INLINE
|
16
|
+
boolean z_gregorian_year_is_leap(zullong year)
|
17
|
+
{return Z_GREGORIAN_YEAR_IS_LEAP(year);}
|
18
|
+
|
19
|
+
|
20
|
+
static Z_INLINE
|
21
|
+
zuint8 z_gregorian_year_days_in_month(zullong year, zuint8 month)
|
22
|
+
{
|
23
|
+
return month == 2
|
24
|
+
? (Z_GREGORIAN_YEAR_IS_LEAP(year) ? 29 : 28)
|
25
|
+
: (month == 4 || month == 6 || month == 9 || month == 11 ? 30 : 31);
|
26
|
+
}
|
27
|
+
|
28
|
+
|
29
|
+
#endif /* _Z_functions_time_date_H_ */
|