{"id":15168642,"url":"https://github.com/sysread/p6-math-vector3d","last_synced_at":"2026-01-23T17:31:39.504Z","repository":{"id":146316071,"uuid":"154338056","full_name":"sysread/p6-math-vector3d","owner":"sysread","description":"3-dimensional vector math for perl6","archived":false,"fork":false,"pushed_at":"2018-10-24T18:53:10.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T07:26:29.057Z","etag":null,"topics":["math","perl6","vector","vector-math"],"latest_commit_sha":null,"homepage":null,"language":"Perl 6","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysread.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","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":"2018-10-23T14:00:32.000Z","updated_at":"2018-10-24T18:53:12.000Z","dependencies_parsed_at":"2023-07-02T18:01:15.652Z","dependency_job_id":null,"html_url":"https://github.com/sysread/p6-math-vector3d","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"5327893ea2fa1d1dc7adbd891f610ffca6ee3920"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sysread/p6-math-vector3d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Fp6-math-vector3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Fp6-math-vector3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Fp6-math-vector3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Fp6-math-vector3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysread","download_url":"https://codeload.github.com/sysread/p6-math-vector3d/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Fp6-math-vector3d/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28696672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["math","perl6","vector","vector-math"],"created_at":"2024-09-27T06:24:12.232Z","updated_at":"2026-01-23T17:31:39.478Z","avatar_url":"https://github.com/sysread.png","language":"Perl 6","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n====\n\nMath::Vector3D\n\nVERSION\n=======\n\n0.0.1\n\nSYNOPSIS\n========\n\n    use Math::Vector3D;\n\n    my $vec = vec(10, 20, 30);\n\n    $vec -= $other-vector;\n    $vec *= 42;\n    $vec /= 10;\n\n    $vec.normalize;\n\n    my $len = $vec.length;\n\nSEE ALSO\n========\n\n  * [Math::Vector](Math::Vector)\n\nHas support for any number of dimensions.\n\nclass Math::Vector3D\n--------------------\n\nVector object\n\n### has Numeric $.x\n\nDefault: 0\n\n### has Numeric $.y\n\nDefault: 0\n\n### has Numeric $.z\n\nDefault: 0\n\n### method length-squared\n\n```perl6\nmethod length-squared() returns Numeric\n```\n\nReturns the squared length of the vector\n\n### method length\n\n```perl6\nmethod length() returns Numeric\n```\n\nReturns the length of the vector\n\n### multi method add\n\n```perl6\nmulti method add(\n    Math::Vector3D:D $v\n) returns Math::Vector3D\n```\n\nDestructively adds a vector to this vector.\n\n### multi method add\n\n```perl6\nmulti method add(\n    Numeric:D $n\n) returns Math::Vector3D\n```\n\nDestructively adds a scalar to this vector.\n\n### multi method sub\n\n```perl6\nmulti method sub(\n    Math::Vector3D:D $v\n) returns Math::Vector3D\n```\n\nDestructively subtracts a vector from this vector.\n\n### multi method sub\n\n```perl6\nmulti method sub(\n    Numeric:D $n\n) returns Math::Vector3D\n```\n\nDestructively subtracts a scalar from this vector.\n\n### multi method mul\n\n```perl6\nmulti method mul(\n    Math::Vector3D:D $v\n) returns Math::Vector3D\n```\n\nDestructively multiplies this vector by another vector.\n\n### multi method mul\n\n```perl6\nmulti method mul(\n    Numeric:D $n\n) returns Math::Vector3D\n```\n\nDestructively multiplies this vector by a scalar value.\n\n### multi method div\n\n```perl6\nmulti method div(\n    Math::Vector3D:D $v\n) returns Math::Vector3D\n```\n\nDestructively divides this vector by another vector.\n\n### multi method div\n\n```perl6\nmulti method div(\n    Numeric:D $n\n) returns Math::Vector3D\n```\n\nDestructively divides this vector by a scalar value.\n\n### method negate\n\n```perl6\nmethod negate() returns Math::Vector3D\n```\n\nReturns a new vector with negated values for x, y, and z.\n\n### method cross\n\n```perl6\nmethod cross(\n    Math::Vector3D:D $v\n) returns Math::Vector3D\n```\n\nDestructively updates this vector to be the cross product of itself and another vector.\n\n### method dot\n\n```perl6\nmethod dot(\n    Math::Vector3D:D $v\n) returns Numeric\n```\n\nComputes the dot product of the vector and the supplied number.\n\n### method angle-to\n\n```perl6\nmethod angle-to(\n    Math::Vector3D:D $v\n) returns Numeric\n```\n\nComputes the angle to the supplied vector.\n\n### method distance-to-squared\n\n```perl6\nmethod distance-to-squared(\n    Math::Vector3D:D $v\n) returns Numeric\n```\n\nComputes the square of the distance between this vector and the supplied vector.\n\n### method distance-to\n\n```perl6\nmethod distance-to(\n    Math::Vector3D:D $v\n) returns Numeric\n```\n\nComputes the distance between this vector and the supplied vector.\n\n### method normalize\n\n```perl6\nmethod normalize() returns Math::Vector3D\n```\n\nDestructively normalizes this vector.\n\n### method set-length\n\n```perl6\nmethod set-length(\n    Numeric:D $n\n) returns Math::Vector3D\n```\n\nDestructively sets the length of the vector.\n\n### method lerp\n\n```perl6\nmethod lerp(\n    Math::Vector3D:D $target,\n    Numeric:D $n\n) returns Math::Vector3D\n```\n\nLerps toward the target vector by the supplied value.\n\n### method List\n\n```perl6\nmethod List() returns List\n```\n\nCoerces to a List of [x, y, z]\n\n### multi sub infix:\u003c+\u003e\n\n```perl6\nmulti sub infix:\u003c+\u003e(\n    Math::Vector3D:D $v,\n    $n\n) returns Math::Vector3D\n```\n\n+ is overloaded to add\n\n### multi sub infix:\u003c-\u003e\n\n```perl6\nmulti sub infix:\u003c-\u003e(\n    Math::Vector3D:D $v,\n    $n\n) returns Math::Vector3D\n```\n\n- is overloaded to sub\n\n### multi sub infix:\u003c*\u003e\n\n```perl6\nmulti sub infix:\u003c*\u003e(\n    Math::Vector3D:D $v,\n    $n\n) returns Math::Vector3D\n```\n\n* is overloaded to mul\n\n### multi sub infix:\u003c/\u003e\n\n```perl6\nmulti sub infix:\u003c/\u003e(\n    Math::Vector3D:D $v,\n    $n\n) returns Math::Vector3D\n```\n\n/ is overloaded to div\n\n### multi sub infix:\u003c==\u003e\n\n```perl6\nmulti sub infix:\u003c==\u003e(\n    Math::Vector3D:D $v1,\n    Math::Vector3D:D $v2\n) returns Bool\n```\n\n== is overloaded to compare two vectors' x, y, and z values\n\n### multi sub vec\n\n```perl6\nmulti sub vec(\n    Numeric:D $x = 0,\n    Numeric:D $y = 0,\n    Numeric:D $z = 0\n) returns Math::Vector3D\n```\n\nSyntactic sugar to construct a new vector from three numbers.\n\n### multi sub vec\n\n```perl6\nmulti sub vec(\n    Math::Vector3D:D $v\n) returns Math::Vector3D\n```\n\nSyntactic sugar to construct a new vector from another vector (clone).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysread%2Fp6-math-vector3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysread%2Fp6-math-vector3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysread%2Fp6-math-vector3d/lists"}